C interview questions – page 16

2,130 questions. Tap “Show answer” to check yourself.

Advertisement
  1. Scope of a global variable which is declared as static?

  2. Write a function to Swap pointers .

  3. What is sizeof(x)?

  4. Write a single line c expression to delete a,b,c from aabbcc

  5. What is preprocessor / precompiler ?

  6. Find the number of bits set in an integer

  7. Write a program to generate a mirror (copy) of the binary tree without using recursion

  8. What is :- Asembler , compiler , Preprocessor , laxical analysis , parsing ?

  9. Point out error, if any, in the following program main() { int i=1; switch(i) { case 1: printf("nRadioactive cats have 18 half-lives"); break; case 1*2+4: print

  10. # include<iostream>

  11. Write C++ program to accept a string and display ascii value letter by letter then display sum of all ascii values.

  12. How can allocate memory for n-dim array?

  13. Advertisement
  14. What is friend class?

  15. Given a pointer to a member variable in a strcture. How do you find the base address of the strcture variable? For Eg

  16. Is there any problem in this code snippet. if yes what are the pro...

  17. What are the advantages of using OOPS?

  18. Make a class diagram for thread-pool. Also discuss how to allocate threads for different calls.

  19. Which of the following statements is true when a derivation inherits both a virtual and non-virtual instance of a base class ?

  20. Distinguish between a # include and #define

  21. You need to create a class diagram or data model for the given requirements. the requirement is as follows In a village there are only few families and there were only one newspaper/magazine agent. there are lot of news paper and magazine av...

  22. Create six large matrices in subprogram (100*100) two static and three stack dynamic ...fill two static,two stack matrices with random numbers 1 to 100 ..the code in subprogram must perform large matrix multiplication on static matrices and should repeat

  23. List the merits and demerits of declaring a nested class in C++?

  24. Function inlining is best used when a. In a small recursive function b. In large function where number of variables used is small c. In a large function where there are many loops and number of variables used is small d....

  25. Referring to the sample code above what is the minimum number of arguments required to call the constructor ? a) 0 b) 1 c) 2 d) 3

  26. Advertisement
  27. In Object Oriented Programming, how would you describe encapsulation? 1. The conversion of one type of object to another. 2. The runtime resolution of method calls. 3. The exposition of data. 4. The separation of inte...

  28. Explain the operation of overloading of an assignment operator

  29. A company has many employees & each employee is led by only 1 person except for the CEO (who has no boss). The cost to the company of an employee is the sum of his salary plus the cost to the company of all the people led by ...

  30. In C++, how to call a fuction BEFORE main?

  31. Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long int.

  32. What is Un handled exception(KERNEL32.DLL):0xE06D7363 in the context of exception handling? pls answer to my mail id.in the flg code i got a problem.i want to know the entire steps followed in exception handling in this program.#include <iostream>using n

Advertisement