1. We can insert pre written code in a C program by using
2. Difference between calloc() and malloc()
3. The first expression in a for loop is
4. Exit() is same as return
Common C Questions
C Programming Frequently Asked Interview Questions
C Programming Questions for Job Interview
5. Break statement is used for
6. Due to variable scope in c
7. What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}
8. calloc() belongs to which library
9. If include files can be nested
10. Which of the following below is/are valid C keywords
CONTINUE READING » - #read
- #get
- #include
- #put
2. Difference between calloc() and malloc()
- calloc() takes a single argument while malloc() needs two arguments
- malloc() takes a single argument while calloc() needs two arguments
- malloc() initializes the allocated memory to ZERO
- calloc() initializes the allocated memory to NULL
3. The first expression in a for loop is
- Step value of loop
- Value of the counter variable
- Any of above
- None of above
4. Exit() is same as return
- TRUE
- FALSE
Common C Questions
C Programming Frequently Asked Interview Questions
C Programming Questions for Job Interview
5. Break statement is used for
- Quit a program
- Quit the current iteration
- Both of above
- None of above
6. Due to variable scope in c
- Variables Created in a function cannot be used another function
- Variables created in a function can be used in another function
- Variables created in a function can only be used in the main function
- None of above
7. What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}
- error
- 0
- 10
- Garbage value
8. calloc() belongs to which library
- stdlib.h
- malloc.h
- calloc.h
- None of above
9. If include files can be nested
- Yes
- No
10. Which of the following below is/are valid C keywords
- integer
- int
- null
- none of above