Welcome to C Programming Quiz, Entry Level !!

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

&& operator

& operator

|| operator

! operator

Question 2. Which of the following operations can be performed on the file "NOTES.TXT" using the below code?
FILE *fp;
fp = fopen("NOTES.TXT", "r+");

reading

writing

appending

read and write

Question 3. 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 4. 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 5. 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 6. 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 7. Which bitwise operator is suitable for turning on a particular bit in a number?

&& operator

|| operator

& operator

| operator

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

* (asterisk)

| (pipeline)

- (hyphen)

_ (underscore)

Question 9. Which of the following cannot be checked in a switch-case statement?

character

integer

float

enum

Question 10. 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>