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...

Thursday, 16 June 2011

Technical Interview "Java" Questions

If a variable is declared as private, where may the variable be accessed? http://materialsforjob.blogspot.com It may be accessed in any of the methods defined in that class. Generally for the security of the variables we declare them as private and using the public methods in the class we use them. Making sure that variables are accessible only in that class. What is the difference between Abstract class and Interface?http://materialsforjob.blogspot.com An abstract class can contain non-abstract methods which do not have to be overridden in the subclass. There is no difference between a fully abstract class (all methods declared as abstract and all fields are public static final) and an interface. How to create a Tabbed Pane in JSP page?http://materialsforjob.blogspot.com //declareprivate...

Monday, 13 June 2011

PHP Interview Questions and answers 3

Strings and regular expressionsWhat will be the answer of the following code snippet? 1echo 'Testing ' . 1 + 2 . '45'; Simply you will give the answer as : Testing 345 But the answer is : 245 That is because you can not sum a number with a string. The first part, before the plus mark is a string though there is 1 there. So engine will simply get it as 0 and the latter part as 245. so answer will be 245. variable interpolationUsing variable interpolation how we can print the following String? “I am visiting the php interview questions website”. The word “question” is inside a variable, $a = ‘question’; Answer is just, echo “I am visiting the php interview {$a}s website”; function return valueWhat will be the out put of the following code snippet? if(!r()) echo ‘aaa’; else echo...

Friday, 10 June 2011

C++ interview questions

What is a void return type? How is it possible for two String objects with identical values not to be equal under the == operator? What is the difference between a while statement and a do statement? Can a for statement loop indefinitely? How do you link a C++ program to C functions? How can you tell what shell you are running on UNIX system? How do you find out if a linked-list has an end? (i.e. the list is not a cycle) How do you write a function that can reverse a linked-list? Can a copy constructor accept an object of the same class as parameter, instead of reference of the object? What is a local class? What is a nested class? What are the access privileges in C++? What is the default access level? What is multiple inheritance(virtual inheritance)? What are its...

Tuesday, 7 June 2011

C and C++ questions for the interview

What is the output of printf(”%d”) What will happen if I say delete this Difference between “C structure” and “C++ structure”. Diffrence between a “assignment operator” and a “copy constructor” What is the difference between “overloading” and “overridding”? Explain the need for “Virtual Destructor”. Can we have “Virtual Constructors”? What are the different types of polymorphism? What are Virtual Functions? How to implement virtual functions in “C” What are the different types of Storage classes? What is Namespace? What are the types of STL containers?. Difference between “vector” and “array”? How to write a program such that it will delete itself after exectution? Can we generate a C++ source code from the binary file? What are inline functions? What is “strstream”...

Search here for "Freshers Jobs"