Welcome to C Programming Quiz, Entry Level !!

Question 1. Which bitwise operator is suitable for turning on a particular bit in a number?

&& operator

|| operator

& operator

| operator

Question 2. Is there any difference between following declarations?
1:  extern int fun();
2:  int fun();

Both are identical

No difference, except extern int fun(); is probably in another file

int fun(); is overrided with extern int fun();

None of the above

Question 3. What will you do to treat the constant 3.14 as a long double?

use 3.14LD

use 3.14L

use 3.14DL

use 3.14LF

Question 4. By default a real number is treated as a ?



long double

far double

Question 5. What is the similarity between a structure, union and enumeration?

All of them let you define new values

All of them let you define new data types

All of them let you define new pointers

All of them let you define new structures

Question 6. In C, if you pass an array as an argument to a function, what actually gets passed?

Value of elements in array

First element of the array

Base address of the array

Address of the last element of array

Question 7. Which of the following special symbol allowed in a variable name?

* (asterisk)

| (pipeline)

- (hyphen)

_ (underscore)

Question 8. Which files will get closed through the fclose() in the following program?

int main()
    FILE *fs, *ft, *fp;
    fp = fopen("A.C", "r");
    fs = fopen("B.C", "r");
    ft = fopen("C.C", "r");
    fclose(fp, fs, ft);
    return 0;

"A.C" "B.C" "C.C"

"B.C" "C.C"


error in fclose()

Question 9. What function should be used to free the memory allocated by calloc() ?


demalloc(variable_name, 0)


decalloc(variable_name, 0)

Question 10. Which bitwise operator is suitable for checking whether a particular bit is on or off?

&& operator

& operator

|| operator

! operator