C Fundamental Test 1

1) Which of the following is the first operating system developed using C programming language?
A.Windows
B.DOS
C.Mac
D.UNIX

Correct Answer:D.(C programming language is invented for developing an operating system called UNIX. By 1973, the complete UNIX OS is developed using C.)
Advertisement

2) The C compiler used for UNIX operating system is
A.cc
B.gcc
C.vc++
D.Borland

Correct Answer:A.(Compiler used for UNIX is ‘cc’ their full form is C compiler. gcc is compiler for linux. Borland and vc++ is compiler for windows.)
Advertisement

3) Which of the following is a logical AND operator?
A.||
B.!
C.&&
D.None of the above

Correct Answer:C.

(The && is called logical AND operator. If both operands are non-zero, then the condition becomes true.

The || is called logical OR operator. If any of the two operands are non-zero, then the condition becomes true.

The ! is called logical NOT operator. It is used for reversing the logic state of its operand.)

Advertisement

4) Which format specifier is used for printing double value?
A.%Lf
B.%L
C.%lf
D.None of the above

Correct Answer:C.(The %lf format specifier is used for printing the double value in a C program.)
Advertisement

5) Which of the following statement is used to free the allocated memory space for a program?
A.vanish(var-name);
B.remove(var-name);
C.erase(var-name);
D.free(var-name);

Correct Answer:D.(The memory allocated by malloc(), calloc(), or realloc() function is deallocated by using the library function free(var-name).)
Advertisement

6) In a library of C programming language, which of the following header file is used for performing mathematical operations?
A.conio.h
B.dos.h
C.math.h
D.stdio.h
The correct option is (c).

Correct Answer:C.(“math.h” is a header file used for performing mathematical operation in a library of C programming language.)
Advertisement

 

 

 

 

Leave A Comment?