Friday, September 11, 2009

robert c

1.main()
{
int const *p = 10;
printf(“%d”, ++(*p));
}
Ans: Compilation Error

2.main()
{
int I;
char *a = “man”;
for(i=0;i<3;i++)
printf(“%c%c%c%c\n”,i[a],a[i],*(a+i),*(i+a));
}
Ans: mmm
aaa
nnn

3.main()
{
extern int i = 10;
printf(“%d”,i);
}
Ans: Runtime error

4.main()
{
float f= 1.1;
double d = 1.1;
if ( f == d)
printf(“I LOVE U”);
else
printf(“I HATE U”);
}
Ans: I HATE U

5.How many queues are required to implement Priority queue
Ans: Two

6.A Binary tree is given and asked to write post order traversal

7.No of Nodes of Perfect Binary Tree :
Ans: 2n-1

8.Which Data Structure is efficient to implement Trees
Ans: Linked List

9. Heterogeneous Linked List is implemented using
Ans: Void pointers

10. #include
void main()
{
int i = 15;
int const & j = i;
cout << i << j << endl;
i = 9;
cout << i << j << endl
}
ANS: 15 15
9 9

11. which of the following function is used to display a character in console
ANS: put

13. To use manipulators we have to include the header file..
ANS: iomanip.h

14. Virtual memory consist of main memory and
ANS: swap files
http://www.ChetanaS.org
15. Command used to partition the disk
ANS: fdisk

No comments:

Post a Comment