Programming - C Programming

You Are Here :: Home > C Language > Introduction to C - General Questions

 
13.

A computer MUST contain:

A. An operating system and a disk drive B. A central processing unit, buses and memory
C. A screen and a keyboard D. A compiler and integrated circuits




14.

The following are simple data types:

A. char[], long, short, double B. *char, double, long, *float
C. float, double, struct, pointer D. int, short, long, float




15.

Assuming the #include directive, which statement will print the following?

5.0 to the power 3 is 125.00

A. printf("%f to the power %f is %f\n", 5.0, 3, 125.0); B. printf("%3f to the power %1i is %6f\n", 5.0, 3, 125.0);
C. printf("%3.1f to the power %i is %6.2f\n", 5.0, 3, 125.0); D. puts("5.0 to the power 3 is %f", 5*5*5);




16.

How many of the following declarations are correct?

One :int i = 7.0;
Two :double void = 0.000;
Three :short array[2] = {0, 1, 2};

A. None B. one is correct
C. one and two are correct D. one,two ,and three are correct




17.

Consider the following program fragment:

int block[] = {13, 2, 5, 8};
block[4] = 15;
Which one of the following sentences is true?

A. The code will cause compile-time errors B. The code will compile but not run
C. The code will compile and run but may produce incorrect results D. The code will compile and will always run properly




18.

Consider the following declaration:

short sheep[4][32];
Which one of the following sentences is true?

A. sheep[1][1] is a pointer-to-short B. sheep[1] is a short
C. sheep[0] is a pointer-to-pointer-to-short D. sheep is a pointer-to-pointer-to-short




« previous

1

2

3

4

5

6

7

8

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on