| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which of the following statements are true? int f(float)

Correct Answer is : It is used to replace a string with another string at runtime

2. The value 132.54 can be represented using which data type?

Correct Answer is : template

3. When a language has the capability to produce new data type mean, it can be called as

Correct Answer is : 416AA

4. Pick the odd one out.

Correct Answer is : 24

5. What happens if try catch block is not used?

Correct Answer is : 5.5

6. Which handler is used to handle all types of exception?

Correct Answer is : 2

7. Which operator is used as catch-all handler?

Correct Answer is : type-safe

8. What function will be called when we have an uncaught exception?

Correct Answer is : char, 1

9. What will not be called when the terminate() is raised in the constructor?

Correct Answer is : sizeof(char) <= sizeof(long) <=sizeof(wchar_t)

10. Which header file is used to pass unknown number of arguments to function?

Correct Answer is : Depends on compiler

11. How can you access the arguments that are manipulated in the function?

Correct Answer is : 8

12. hat is the output of this program? #include #include using namespace std; float avg( int Count, ... ) { va_list Numbers; va_start(Numbers, Count); int Sum = 0; for (int i = 0; i < Count; ++i ) Sum += va_arg(Numbers, int); va_end(Numbers); return (Sum/Count); } int main() { float Average = avg(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9); cout << "Average of first 10 whole numbers : " << Average; return 0; }

Correct Answer is : 4

13. What is the maximum number of arguments or parameters that can be present in one function call?

Correct Answer is : 45387

14. Which of the header file should be added in the below code to properly run the program? #include using namespace std; int print_all (int num, ...) { int sum = 0; va_list args; va_start (args,num); for (int i = 0; i < num; i++) { int num = va_arg (args,int); cout<
Correct Answer is : constructor

15. What will initialize the list of arguments in stdarg.h header file?

Correct Answer is : 2.1: 378.228

16. Which keyword is used to define the user defined data types?

Correct Answer is : 1

17. What does the data type defined by union will do?

Correct Answer is : template

18. What is the syntax of user-defined data types?

Correct Answer is : #include

19. How many types of user-defined data type are in c++?

Correct Answer is : namespace std

20. What is the scope of typedef defined data types?

Correct Answer is : 9