C Programming Questions Answers - Chapter 1

C Programming Questions Answers - Chapter 1 includes basic and important questions on C Programming Language which are important for IBPS IT Officer Aptitude exam, Campus Placements and other technical interviews and exams.

11) Due to variable scope in

  • 1) Variables created in a function cannot be used another function
  • 2) Variables created in a function can be used in another function
  • 3) Variables created in a function can only be used in the main function
  • 4) None of above
View Answer View Explanation
Ans.   A
Explanation :

12) What will be the output of following program #include main() { int x,y = 10; x = y * NULL; printf(\'%d\',x);

  • 1) error
  • 2) 0
  • 3) 10
  • 4) Garbage value
View Answer View Explanation
Ans.   B
Explanation :

13) Difference between calloc() and malloc

  • 1) calloc() takes a single argument while malloc() needs two arguments
  • 2) malloc() takes a single argument while calloc() needs two arguments
  • 3) malloc() initializes the allocated memory to ZERO
  • 4) calloc() initializes the allocated memory to NULL
View Answer View Explanation
Ans.   B
Explanation :

14) calloc() belongs to which libr

  • 1) stdlib.h
  • 2) malloc.h
  • 3) calloc.h
  • 4) None of above
View Answer View Explanation
Ans.   A
Explanation :

15) Which of the following below is/are valid C keywo

  • 1) integer
  • 2) int
  • 3) null
  • 4) none of above
View Answer View Explanation
Ans.   B
Explanation :

16) total number of keywords in C

  • 1) 30
  • 2) 32
  • 3) 48
  • 4) 132
View Answer View Explanation
Ans.   B
Explanation :

17) What is use of \r i

  • 1) used to insert a vertical tab
  • 2) used to insert a tab
  • 3) places cursor at the end of line
  • 4) places cursor at the start of line
View Answer View Explanation
Ans.   D
Explanation :

18) printf() belongs to which library o

  • 1) stdlib.h
  • 2) stdio.h
  • 3) stdout.h
  • 4) stdoutput.h
View Answer View Explanation
Ans.   B
Explanation :

19) A variable i

  • 1) must have a valid datatype
  • 2) can't have a name same as keyword
  • 3) must have a name starting with a character
  • 4) All of above
View Answer View Explanation
Ans.   D
Explanation :

20) What is correct order of precedence i

  • 1) Addition, Division, Modulus
  • 2) Addition, Modulus, Division
  • 3) Multiplication, Substration, Modulus
  • 4) Modulus, Multiplication, Substration
View Answer View Explanation
Ans.   D
Explanation :
<< Previous Page Next Page >>

Get Free Current Affairs and Govt Jobs Alerts in your mailbox

Current Affairs
Govt Jobs

Visit Our Blog