Hi
I went to company called "intense" for attending interview. But, we were told to attempt a written test. It had 2 sections.
Section 'A' had 2 programs.
1) Write a Program to remove the duplicate elements from an array
2)1) Write a Program to count the number of elements in a stack
Section 'B' had 25 multiple questions, most of them are from test ur C skills
1) main()
{
printf("%p", main);
}
2) main()
{
int i=5;
printf("%d%d%d%d%d",i++, i--, i, ++i, --i );
}
3) main()
{
printf("%d%c");
}
4)
main()
{
int i = 3;
while(i--)
{
i =100;
printf("%d",i );
}
}
5) struct xx
{
int a=3;
char b[4]= "this";
};
main()
{
struct xx s;
printf("%d%s", s.a, s.b);
}
6) main()
{
register i =10;
char b[3] = "hai";
printf("%d%s",i, b );
}
7) What is the difference between malloc/free and new/delete
8) What is the difference between #define and typedef
9) When are copy constructors called
10) What are mutable objects
11) Write a cpp code to print the odd numbers from 1 to 100 without using division
12) What are storage classes in cpp
13) What is pragma
No comments:
Post a Comment