C interview questions – page 15

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

Advertisement
  1. Will it work all the time?

  2. /*Are my STATEMENTS in the following program correctEXCEPT IN CASE 3 THE ARE WRONG SO PLEASE CORRECT IT*/#include<stdio.h>#include<conio.h>#include<alloc.h>void main(){ int i=3; int j; clrscr();//case 1://when only post increment in the expr then all &

  3. Which of the following about automatic variables within a function is correct? A. Its type must be declared before using the variable b. They are localc. c. They are not initialized to zerod. d. They are GLobal

  4. Consider the following two code segments:

  5. Which one of the following statements allocates enough space to hold an array of 10 integers that are initialized to 0 ? a) int *ptr = (int *) calloc(10,sizeof(int)); b) int *ptr = (int *) alloc( 10*sizeof(int)); c) int *ptr = (i...

  6. Which one of the following represents a correct and safe declaration of NULL ? a) typedef((void *)0) NULL; b) typedef NULL(char *)0; c) #define NULL((void *)0) d) #define NULL((char*)0)

  7. Output of the following program

  8. With every use of memory allocation function should be used to release allocated memory which is no longer needed ? a) dropmem() b) dealloc() c) release() d) free()

  9. All the programs are tested under Turbo C/C++ compilers. It is assumed that,?? Programs run under DOS environment,?? The underlying machine is an x86 system,?? Program is compiled using Turbo C/C++ compiler.The program output may depend on the information

  10. What function will read a specified number of elements from a file ? a) fread() b) readfile() c) fileread() d) gets()

  11. What is the largest value an integer can hold in a Standard C compiler ? a) 32767 b) 65536 c) 2147483647 d) INT_MAX

  12. Char *a[4]= {"jaya", "mahe", "chandra", "buchi"};

  13. Advertisement
  14. You are given a the source to a application which is crashing when run. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C standard library. What prog...

  15. C program for sum of digits of a number

  16. How to find the size of a given variable without using sizeof() operator?

  17. Const char * char * const What is the differnce between the above two?.

  18. Cond 1?cond 2?cond 3?:exp 1:exp 2:exp 3:exp 4; is equivalent to which of the following?

  19. What is the difference between the following

  20. In the (generic) code segment above what will be the value of the variable i at completion ? a) 0 b) 1 c) 3 d) 9

  21. then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

  22. What is false about the following -- A compound statement is

  23. What is the difference between while loop and do while loop ?

  24. Difference between :- 1) C and C++2) main() in c and main() in c++ ?

  25. Which of the following is not true about C++

  26. Advertisement
  27. What is int *p(char (*s)[])

  28. What is the output of this code snippet

  29. Difference between : - 1)Global variable and Local variable , 2)Static variable and Global variable ?

  30. What would be the return value of the below function for a) RecursionTest(2,2) b) RecursionTest(3,3)

  31. How to improve my c knowledge........

  32. What&#39;s the output and how does this work.... ...

Advertisement