You are on page 1of 5

1. What is coercion? Ans: The Type Casting is also known as coercion IN ‘C’. 2.

What is the size of a character literal in C? Ans: 2 byte/4 byte depending upon compiler 3. What is the use %g? Ans: it is a conversion char used to represent a floating point number either in decimal format or exponential format according to size. 4. What is ellipsis? Ans: (…) is known as ellipsis which represent a variable no’s or types of argument. 5. How many arguments main() function can take? Ans: 3 6. main() function is predefined or user defined? Ans: System specified user defined 7. What header files contain? Ans: Function declarations and MACRO 8. What is size of union variable? Ans: Size of the max size member 9. What is a self referential structure? Ans: the structure which contains a pointer to itself 10. Can a union be self-referenced? Ans: No 11. What does segmentation violation means? Ans: This error occurs when program access a memory that it should not have or to which access is not granted. 12. What is the little endian and big endian? Ans: Little endian means the lower order byte of a number is stored in memory at the lowest address and the high order bytes at the heighest address. Big endian is reverse.

while loop. What is the different between far pointer and huge pointer? Ans: Far pointer does not normalize the address but huge pointer normalize the address. 19. What is NULL macro? And: NULL is a macro that is used to represent null pointer in source code. What is loop inversion? Ans: Loop inversion is a compiler optimization. which replaces a while loop by an if block containing a do.. 21. Null char Memcpy copy chars from one string to another till a given length. What are the limitations of bit fields? Ans: We can not input its values using scanf We can not have a pointer to bit field . and their width in bits can be explicitly declared. 18. Statement must have a semicolon but expression may not have semicolon. What is bit-field? Ans: The space-saving structure members are called bit fields. 20. 17. 16. What is effect of using %n in scanf? Ans: it represent the the no of chars input from keyboard. What is side effect of a variable? Ans: The changes to a global variable in one block will be an effect in another block. Difference between expression and a statement.e. 14. What is the difference between exit() and _exit() functions? Ans: exit() flush the standard I/O buffer but _exit() does not flush the standard I/O buffer. 22. 15.13. What is the difference between strcpy() and memcpy()? Ans: strcpy copy chars form one string to another till ‘\0’ i. a loop transformation.

b). { int main() int x. i=0. printf("%d %d %d %d". c. a^=b^=a^=b. for(p=arr+4. Ans: 1 1 0 0 26.23. What the use of volatile keyword? Ans: C's volatile keyword is a qualifier that is applied to a variable when it is declared.1. printf(“%d”. int a=0.z. Ans: -2 28. return 0. . printf(“%d %d”. p[-i]).scanf).z).i. a.d. z=~x+~y.b=7.i++) printf(“%d “.c=0. } Ans: infinite loop 29. printf("%d".y=0.d). Ans: 7 5 25. } Ans: % is string is string 27.2.3. 24. x=main(). int x=0.a.i<=4. d=a++ || b++ && ++c. #define scanf “%s is string” main() { printf(scanf. int arr[ ]={0.4}.b=0. int *p. b.x). int a=5. It tells the compiler that the value of the variable may be changed by an external agent like operation system sub routines.

printf(“%d”.). What is wchat_t in C++? Ans: Wide character type 32.such as casting the integer value to an integer pointer. One is base portion that is copied to the base class object and other is the derived portion that is slices off. What is name mangling? Ans: Conversion of a function name into a code according to nos and types of argument. What is upcasting? Ans: conversion of a derived class object to a base class object . for(. What is object slicing? Ans: When a derived class object is assigned to a base class object it is divided into two parts. { main() int i=0.Ans: 4 3 2 1 0 30. What is VTABLE? Ans: Virtual Table which stores the addresses of virtual functions of a class 34. } Ans: 0 31. 39. What is VPTR? Ans: Virtual pointer through which virtual functions are accessed 35. What is RTTI? Ans: Runtime type identification 36.i ). What is Composition? Ans: The containership or delegation is also known as composition 38. What is reinterpret cast? Ans: It convert one type directly into another . 33. 37.++ i .

40. 42. What is the use of mutable keyword? Ans: If a data member is declared with mutable that can be modified by a constant member function. 43. What is the size of an abject of empty class? Ans: one byte 45. What is the use of explicit keyword? Ans. Which operator automatically calls the destructor? Ans: delete *** . to explicitly call a constructor. What is a pointer to constant? Ans: It is a pointer to whom it points to can not be modified 44. Can pure virtual function have a body? Ans: Yes 41.