Tuesday, July 17, 2012
CS201 Subjective Questions Final Term Spring 2012
Questions
1. Find the error in following syntax,
while(i<=100)
sum+=i*i;
2. General syntax of declaring and initializing the data members.
3. class String
{
char buf [25];
};
Write code for assignment (=) operator function which assign one String object to other object. Your code should also avoid self assignment.
4. Write a simple program, which will get a stream of character and output the stream of characters using cin and cout.
0 comments:
Post a Comment