Friday, 17 June 2011

C++ interview questions and answers

What is the most efficient way to reverse a linklist? How to sort & search a single linklist? Which is more convenient - single or double-linked linklist? Discuss the trade-offs? What about XOR-linked linklist? How does indexing work? char s[10]; s=”Hello”; printf(s); What will be the output? Is there any error with this code? What is the difference between char s[]=”Hello”; char *s=”Hello”; Please give a clear idea on this? Why do we pass a reference for copy constructors? If it does shallow copy for pass by value (user defined object), how will it do the deep copy? What is the difference between shallow copy & deep copy? What is the difference between strcpy and memcpy? What rule should we follow when choosing between these two? If we declare two variable...

Search here for "Freshers Jobs"