Welcome to C Programming Quiz, Entry Level !!

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

float

double

long double

far double

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

&& operator

& operator

|| operator

! operator

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

dealloc();

demalloc(variable_name, 0)

free()

decalloc(variable_name, 0)

Question 4. A pointer is a

keyword used to create variables

variable that stores address of an instruction

variable that stores address of other variable

all of the above

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

* (asterisk)

| (pipeline)

- (hyphen)

_ (underscore)

Question 6. What are the different types of real data type in C ?

float, double

short int, double, long int

float, double, long double

double, long int, float

Question 7. What is the purpose of "rb" in fopen() function used below in the code?
FILE *fp;
fp = fopen("source.txt", "rb");

open "source.txt" in binary mode for reading

open "source.txt" in binary mode for reading and writing

Create a new file "source.txt" for reading and writing

none of the above

Question 8. How will you free the memory allocated by the following program?
#include<stdio.h>
#include<stdlib.h>
#define MAXROW 3
#define MAXCOL 4

int main()
{
    int **p, i, j;
    p = (int **) malloc(MAXROW * sizeof(int*));
    return 0;
}

memfree(int p)

dealloc(p)

malloc(p, 0)

free(p)

Question 9. Which statement will you add in the following program to work it correctly?
#include<stdio.h>
int main()
{
    printf("%f\n", log(36.0));
    return 0;
}

#include<conio.h>

#include<math.h>

#include<stdlib.h>

#include<dos.h>

Question 10. Which bitwise operator is suitable for turning off a particular bit in a number?

&& operator

& operator

|| operator

| operator