Alter Placement Paper |   3347

Alter Placement Paper


Technical – C / C++ Language Written Test Paper for Alter Engineering


What is the difference between the functions malloc, calloc and realloc?


How to open a binary file in Read/Write mode in C language?


What is exception handling?


What are pure virtual functions?


Difference between member functions and static member functions?


Difference between delete[ ] and delete?


What is copy constructor?


What are namespaces?


What is call by value and call by reference?


How can a C function be invoked using a C++ program?


What is the difference between function overloading and function overriding?


There are 5 – 6 programs as well in this exam. b=10;
int *p=&b;
what is the output?

2.What is the difference between malloc, calloc and realloc?

3.What does malloc return in C and C++?

4. main()
char *a="hello";
char *b="bye";
char *c="hai";
int x=10,y=100;

5.whats the output?
void main()
  int a,b;
printf("%d %d",a,b);
int sumdig(int n)
  static int sum;
  int d;
return s;

6.what is the output?

7.Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.

8.How do we open a binary file in Read/Write mode in C?

class A
class derived:public A

9.what is wrong with this type of declaration?

10.what do you mean by exception handling?

11.What are "pure virtual" functions?

12.What is the difference between member functions and static member functions?

13.What is the4 difference between delete[] and delete?

14,Question on Copy constructor.

15.What are namespaces?

16.One question on namespace.

17.What are pass by valu and pass by reference?

18what is the disadvantage of pass by value?

19.How to invoke a C function using a C++ program?

char *str;
char *str1="Hello World";
what is the output?

20Difference between function overloading and function overriding.

21.There is a base class sub, with a member function fnsub().

22. There are two classes super1 and super2 which are subclasses of the base class sub.  if and pointer object is created of the class sub which points to any of the two classes super1 and super2, if fnsub() is called which one will be inoked?