Interview questions

C interview questions – page 38

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

  1. In C++, what is a constructor,destructor?

  2. Void main (){int x = 10;printf ("x = %d, y = %d", x,--x++);}

  3. What is the difference between class and structure?

  4. Does C# support #define for defining global constants?

  5. Does Console.WriteLine() stop printing when it reaches a NULL character within a string?

  6. What are the characteristics of arrays in C?

  7. Does C# support multiple inheritance?

  8. How argc and argv works in the following main function?main(int argc,char *argv[]) { int n,i=0; while(argv[1][i]!='

  9. WRITE A PROGRAM TO READ A REAL NUMBER X ANF FIND THE EVEN NUMBER NEAREST TO X.

  10. What is the difference between NULL and NUL?

  11. Which mistakes are called as token error?

  12. What is difference between deep copy & sallow copy?

  13. What do you mean by pure virtual functions?

  14. Where is the output of TextWriterTraceListener redirected?

  15. How do I port "synchronized" functions from Visual J++ to C#?

  16. How can we get direct printout of a c file without giving print command from bin or tc?eg i want to get the printout of a program directly after execution from the c window itself.

  17. Following declarations are different from one anotherconst char *const s; char const *const s;

  18. Give some explanation for "for" LOOP ON C LANGUAGE?

  19. If the following program (myprog) is run from the command line as myprog monday tuesday wednesday thursday What would be the output? main(int argc, char *argv[]) { while(--argc >0) printf("%s",*++argv); }

  20. How to write a C program for displaying a sentence without output command?

  21. Difference between arrays and pointers?

  22. What is File Mode?.Types Of file mode?.What is Pointer?.which one is most useful in Structure or Unoin?.

  23. Write a program which accepts a filename as a command line argument and coverts all characters in the file to uppercase.

  24. We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind()

  25. How to get string in files and print the string in the reverse order?

  26. What is the use of semicolon at the end of every statement?

  27. How would you use the functions memcpy(),memset(),memmove()?

  28. Explain about object oriented databases?

  29. What is stand alone class and where it will be used? Describe with the help of an example.

  30. WRITE A PROGRAM TO READ A SET OF INTEGERS AND TO SEPARATE ALL ODD AND EVEN NUMBERS .WRITE ALL EVEN NUMBERS IN ASCENDING ORDER.

Companies that ask C questions