Wednesday 30 March 2011

I wish you all the best Srilatha madam

       Today "Srilatha" maam's last working day in TRR COLLEGE. We wish you all the best , I hope You will achieve your goal very soon as you have a talented, dedicated, sincere. But CME staff & Students will miss you.....











Sunday 27 March 2011

feed back about the lab exams

                                                              Nanda Kishore ! we miss you....


My Deep Condolences to S Nanda Kishore(09124-CM-108) family : Yesterday I was shocked by this sad news. I will never forget You . You were a calm person. 
On the last day and last conversation between me and him "Having seen his paper I thought of scold him but by seeing his innocent face I didn't scold him, so I asked him "Can you improve your final exam?, he replied "Yes sir, I will improve...." these words are the last words from him.
I'm sorry I could not convey my condolences in person as I was in the college., still We are unable to digest this Bitter news......



Today 1st nd 2nd batch students were conducted External Lab exam:

Today K Vamshi, Bhavani, K Ashwini. T Anusha performed excellent in the Viva.
  • Hey Mustakeem  don't know the Data types? these are the basic concepts of C language, but you didnt explain. I will conduct viva again for you
feed back on 29-03-2011
  • Today I am little bit happy as some of the persons improved drastically especially Bhanu performed excellent in the viva but still he get confuses while writing the program.
  • I heard mubeen, sheetal performed good in the viva but I had not taken viva them but I believe that they will write well in the exam, I hope they work hard to secure good marks. 
  • Vikas ! What happend to you, still you have to improve the programming skills.
  • neha ! I got disappointed while taking the viva I know that if you seriously concentrate on the programming you will become one of the topper in both sections as you have good skill but you are not utilizing. Archana ! in RDBMS External you got full marks but this time ? so work hard for external
  • Om prakash I heard you gave very well in the viva. I am very desired to test once again if possible.
  • I will write the feed back about remaining students tomorrow
  •  
Today external exam were conducted for 3rd, and 4th batch students:
Still some of the students are neglecting practicing the programs.
  •  I observed that some of the students gave poor performance in the viva.
  • four students were failed in the exam
  • I felt very happy that "Srinivas Reddy", "Jagannadh", "Jagadish" ,"Jebunissa Begum" performed Excellent in the viva as well as program execution.
  • Some of the Students also performed excellent that will be listed out when I check their papers 

Wednesday 23 March 2011

templates

Templates are a feature of the C++ programming language that allow functions and classes to operate with generic types . This allows a function or class to work on many different data types without being rewritten for each one.
Templates are of great utility to programmers in C++, especially when combined with multiple inheritance and operator overloading.
types of the templates:
1. function templates
2. generic classes or classes
3. explicit template specialization
2 Advantages and disadvantages
3 Generic programming features in other languages

Function templates

A function template behaves like a function except that the template can have arguments of many different types (see example). In other words, a function template represents a family of functions. For example, the C++ Standard Library contains the function template max(x, y) which returns either x or y, whichever is larger. max() could be defined like this, using the following template:
#include <iostream>
 
template <typename T>
const T& max(const T& x, const T& y)
{
  if(y < x)
    return x;
  return y;
}
 
void main()
{
  // This will call max <int> (by argument deduction)
  cout << max(3, 7) << std::endl;
  // This will call max<double> (by argument deduction)
  cout << max(3.0, 7.0) << std::endl;
  // This type is ambiguous; explicitly instantiate max<double>
  cout << max<double>(3, 7.0) << std::endl;
  getch();
}

Friday 18 March 2011

trr staff


























4. C++ I/O


1.) C++ I/O
C++ new features for handling I/O operations are called streams. Streams are abstraction that refer to data flow. Streams are classified into two types:
There are:
                   Output stream
                    Input stream

Output stream: The output stream allow us to perform write operations on output devices. Output on the standard stream is performed using the cout object

Syntax: cout<<variable;

Input stream: the input stream allow us to perform read operation. Input from the standard stream is performed using cin object.

Syntax: cin>>variable;

2) Hierarchy of stream classes:

The c++ input –output system supports a hierarchic of classes that are called stream classes.
Hierarchy of stream classes.




The iostream facility of C++ provides an easy means to perform I/O. the class istream uses predefined stream cin object that can be used to read data from standard input device (ex: keyboard) the extraction operator >> is used to get data from a stream. The insertion operator << is used to output data into a stream. The classes istream, ostream and iostream which are designed exclusively to manage the console, device are declared in the header file “iostream.h”. 

2) Explain about IOS CLASS:


It provides common to both input and output. It contains a pointer to a buffer object.
The classes derived from the ios class (istream, ostream, iostream) perform specialized input-output operations.

·        Istream does formatted input.
·        Ostream does formatted output.
·        IOstream does formatted input and output.

IStream class: It is derived class of IOstream and inherits the properties of IOS. It defined input functions such as get(), getline(), and read(). Stram extraction operator >> to read data from a standard input device to the memory items.

OStream class: it is a derived class of ios and hence, inherits the properties of IOS. It defines output functions such as put() and write(). Stream insertion operator <<.

IOstream class : It is derived from base classes istream and ostream which are inturn inherited from class ios. It provides facility for handling both input and output.Stream.

 
Explain I/O manipulators and give examples

this pointer




                                         this pointer
The this pointer is used as a pointer to the class object instance by the member function. The address of the class instance is passed as an implicit parameter to the member functions. The sample below, in this c++ Tutorial shows how to use it. It is a common knowledge that C++ keeps only one copy of each member function and the data members are allocated memory for all of their instances. This kind of various instances of data are maintained use this pointer. Look at the sample below. 
notes on this pointer:
  • this pointer stores the address of the class instance, to enable pointer access of the members to the member functions of the class.
  • this pointer is not counted for calculating the size of the object.
  • this pointers are not accessible for static member functions.
  • this pointers are not modifiable.
  •  
  •  
EXAMPLE:

#include<iostream.h>
class A
{
private:
int a;
public:
void set()
{
this->a=11;
cout<<”\na=”<<this ->a;
cout<<”\na=”<<a;
}
};

void main()
{
A obj;
obj.set();    //here ‘this’ pointer points to obj.
}

Output:
a=11
a=11

this’ pointer always points to the object with respect to which a member function is called.