Language in C Interview Questions and Answers
Difficulty Level: AllBeginnerIntermediateExperienced/Expert
Ques 3. Why doesn't the following statement work?
char str[ ] = "Hello" ;
strcat ( str, '!' ) ;
Ques 4. How do I know how many elements an array can hold?
Ques 5. How do I write code that reads data at memory location specified by segment and offset?
Ques 6. How do I compare character data stored at two different memory locations?
Ques 7. The Spawnl( ) function...
Ques 8. Are the following two statements identical?
char str[6] = "Kicit" ;
char *str = "Kicit" ;
Ques 9. Is the following code fragment correct?
const int x = 10 ;
int arr[x] ;
Ques 11. How do I change the type of cursor and hide a cursor?
Ques 13. How do I write code to get the current drive as well as set the current drive?
Ques 14. The functions memcmp( ) and memicmp( )
Ques 15. How do I write code to find an amount of free disk space available on current drive?
Ques 17. How does free( ) know how many bytes to free?
Ques 18. What is the use of randomize( ) and srand( ) function?
Ques 19. How do I determine amount of memory currently available for allocating?
Ques 20. How does a C program come to know about command line arguments?
Ques 23. Compare FP_SEG And FP_OFF.
Ques 25. How do I write code that reads the segment register settings?
Ques 26. What is environment and how do I get environment for a specific entry?
Ques 27. How do I display current date in the format given below?
Saturday October 12, 2002
Ques 29. How do I write printf( ) so that the width of a field can be specified at runtime?
Ques 30. How to find the row and column dimension of a given 2-D array?
Ques 31. The access( ) function...
Ques 32. How do I convert a floating-point number to a string?
Ques 35. How do I use the function ldexp( ) in a program?
Ques 36. Can we get the mantissa and exponent form of a given number?
Ques 37. How do I write code that executes certain function only at program termination?
Ques 38. What are memory models?
Ques 39. How does C compiler store elements in a multi-dimensional array?
Ques 41. How can I find the day of the week of a given date?
Ques 43. How do I print the contents of environment variables?
Ques 45. How do I use scanf( ) to read the date in the form 'dd-mm-yy' ?
Ques 47. Are the expressions *ptr++ and ++*ptr same?
Ques 49. Can we convert an unsigned long integer value to a string?
Ques 51. How do I use function ecvt( ) in a program?
Ques 52. How to run DIR command programmatically?
Ques 54. How to restrict the program's output to a specific screen region?
Ques 56. How to obtain the current drive through C ?
Ques 58. Can we get the x and y coordinate of the current cursor position ?
Ques 59. How do I programmatically delete lines in the text window?
Ques 60. How do I get the time elapsed between two function calls ?
Ques 61. How do I use swab( ) in my program ?
Ques 62. What does the error "Null Pointer Assignment" mean and what causes this error?
Ques 63. How to build an expression trees ?
Ques 64. Can we get the remainder of a floating point division ?
Ques 65. How to extract the integer part and a fractional part of a floating point number?
Ques 66. How do I define a pointer to a function which returns a char pointer?
Ques 68. How to use scanf( ) to read the date in the form of dd-mm-yy?
Ques 69. Why the output of sizeof ( 'a' ) is 2 and not 1 ?
Ques 70. Can we use scanf( ) function to scan a multiple words string through keyboard?
Ques 71. How to set the system date through a C program ?
Ques 72. How can I write a general-purpose swap without using templates?
Ques 74. How to obtain a path of the given file?
Ques 75. Can we get the process identification number of the current program?
Ques 76. How do I write a function that takes variable number of arguments?
Ques 77. Can we change the system date to some other date?
Ques 78. How to use function strdup( ) in a program?