C Fundamental Test 4


16) What is the correct value returned to the operating system upon successful completion of a program?

  1. 0
  2. -1
  3. 1
  4. Programs do not return a value

The correct option is (a).

Explanation:

After successful completion of a program, 0 is returned to the operating system.

17) Who is known as the founder of C language?

  1. James Gosling
  2. Martin Richard
  3. Brian Kernighan
  4. Dennis Ritchie

The correct option is (d).

Explanation:

The C programming language has been developed by Dennis Ritchie in the year 1972 while working at AT&T Bell Laboratories.

18) The C variables are case insensitive.

  1. True
  2. False

The correct option is (b).

Explanation:

The C variables are case sensitive. This means that variables sal, Sal and SAL would be treated as different variables in C.

19) A character variable can store ___ character(s) at a time.

  1. 1
  2. 2
  3. 0
  4. NULL

The correct option is (a).

Explanation:

A character variable can at a time store only one character. In fact, if we execute the following statements, what gets stored in variable ch is not really the character constant, but the ASCII value of 'A', which is 65.

20) How would you round off a value from 1.66 to 2.0?

  1. floor(1.66)
  2. ceil(1.66)
  3. roundup(1.66)
  4. roundto(1.66)

The correct option is (b).

Explanation:

The ceil(1.66) is used for round off a value from 1.66 to 2.0. The ceil() returns upper value of a fractional part and floor() returns lower value.





Latest Courses