C Programming Fundamentals

Essential C programming concepts including operators, loops, data types, and built-in functions

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

C programming was invented by ___________.

  1. Dennis Ritchie in 1972
  2. Dennis Lily in 1971
  3. George in 1972
  4. Runge Kutta in 1970
  5. Both Dennis Ritchie and Dennis Lily in 1972
Question 2 Multiple Choice (Single Answer)

Which of the following is a valid identifier?

  1. data 1
  2. fil_2
  3. a-b
  4. return
  5. for
Question 3 Multiple Choice (Single Answer)

If a=5 and b=8, what is the value of a & b?

  1. 0000
  2. 1101
  3. 0101
  4. 1000
  5. 1111
Question 4 Multiple Choice (Single Answer)

What is the value of floor (-5.2)?

  1. -5
  2. -6
  3. -5.2
  4. -4
  5. -7
Question 5 Multiple Choice (Single Answer)

If a=10 and b=20, what is the value of c=a>b?

  1. 10
  2. 20
  3. 15
  4. 0
  5. 1
Question 6 Multiple Choice (Single Answer)

What is the value of Ceil (-3.8) in C programming language?

  1. -3
  2. -4
  3. -5
  4. -2
  5. -3.8
Question 7 Multiple Choice (Single Answer)

If x=5 and y=++x, what are the values of x and y?

  1. x=5, y=5
  2. x=5, y=6
  3. x=6, y=6
  4. x=6, y=5
  5. x=5, y=7
Question 8 Multiple Choice (Single Answer)

If a=4, then b=a. What are the values of a and b?

  1. 4, 4
  2. 4,3
  3. 3,3
  4. 3,4
  5. 2,4
Question 9 Multiple Choice (Single Answer)

Which of the following explains (;;)?

  1. Finite loop
  2. Infinite loop
  3. Boolean 1
  4. Boolean 0
  5. None of the above
Question 10 Multiple Choice (Single Answer)

A double uses the size of ____________.

  1. 32 bit
  2. 64 bit
  3. 16 bit
  4. 80 bit
  5. 8 bit
Question 11 Multiple Choice (Single Answer)

If a=5 and b=7, then a | b is __________.

  1. 111
  2. 101
  3. 000
  4. 010
  5. 001
Question 12 Multiple Choice (Single Answer)

What is the value of a/b if both are floats; a=22.0 and b=3.0?

  1. 7
  2. 22/3
  3. 7.33
  4. 6
  5. 8
Question 13 Multiple Choice (Single Answer)

While loop is called ______________.

  1. entry controlled loop
  2. exit controlled loop
  3. exit-entry controlled loop
  4. entry-exit controlled loop
  5. output controlled loop
Question 14 Multiple Choice (Single Answer)

What is the value of 14%3+7%2 in C progamming language (where two operators are used; first is modulus operator and the second is addition operator)?

  1. 3
  2. 7.6
  3. 7.5
  4. 8.1
  5. 8
Question 15 Multiple Choice (Single Answer)

do while is called _________.

  1. entry controlled loop
  2. exit controlled loop
  3. input controlled loop
  4. output controlled loop
  5. entry-exit controlled loop