Interview Questions on Fundamental of C Language set-8


1) The control automatically passes the first statement after the loop in ..

A. Continue statement

B. Break statement

C. Switch statement

D. If statement


2) Which of the following is a scalar data type?

A. Float

B. Union

C. Array

D. Pointer


3) The given FOR loop is ..

for( ; ; ) { printf(" "); }

A. valid

B. invalid

C. indefinite

D. displays runtime error


4) In C, a union is ......

A. memory location

B. memory store

C. memory screen

D. memory space


5) The ......... statement causes immediate exit from the loop overriding the condition test ..

A. Exit

B. Break

C. Goto

D. None of the above


6) Pointers are of ..........

A. integer data type

B. character data type

C. unsigned integer data type

D. None of these


7) The keyword used to transfer control from a function back to the calling function is ...

A. switch

B. goto

C. go back

D. return


8) Identify the invalid pointer arithmetic ......

A. addition of float value to a pointer

B. comparison of pointers that do not point to the element of the same array

C. subtracting an integer from a pointer

D. assigning the value 0 to a pointer variable


9) In C, if you pass an array as an argument to a function, what actually gets passed?

A. Value of elements in array

B. First element of the array

C. Base address of the array

D. Address of the last element of array


10) Header file in C contain ......

A. compiler commands

B. library functions

C. header information of C programs

D. operators for files

11) Which of the following cannot be checked in a switch-case statement?

A. Character

B. Integer

C. Float

D. Enum


12) The printf() function returns which value when an error occurs?

A. Positive value

B. zero

C. Negative value

D. None of these


13) When array elements are passed to a function with their values, it is called as ...

A. end value

B. call by value

C. return value

D. first value


14) Which of the following is character oriented console I/O function?

A. getchar() and putchar()

B. gets() and puts()

C. scanf() and printf()

D. fgets() and fputs()


15) In the for loop structure there are .......... optional clauses.

A. one

B. two

C. three

D. four


16) Which header file is essential for using strcmp() function?

A. string.h

B. strings.h

C. text.h

D. strcmp.h


17) A multidimensional array can be expressed in terms of ...........

A. array of pointers rather than as pointers to a group of contiguous array

B. array without the group of contiguous array

C. data type arrays

D. qualifies of data types


18) The real constant in C can be expressed in which of the following forms?

A. fractional form only

B. exponential form only

C. ASCI form only

D. Both fractional and exponential forms


19) A structure ...

A. can be read as a single entity

B. cannot be read as a single entity

C. can be displayed as a single entity

D. has member variables that cannot be read individually


20) What will the function randomize() do?

A. returns a random number

B. returns a random number generator in the specified range

C. returns a random number generator with a random value based on time

D. return a random number with a given seed value


Answers:

1) B. Break statement
2) A. Float
3) D. displays runtime error
4) C. memory screen
5) B. Break
6) D. None of these
7) D. return
8) D. assigning the value 0 to a pointer variable
9) C. Base address of the array
10) B. library functions
11) C. Float
12) C. Negative value
13) B. call by value
14) A. getchar() and putchar()
15) C. three
16) A. string.h
17) A. array of pointers rather than as pointers to a group of contiguous array
18) D. Both fractional and exponential forms
19) A. can be read as a single entity
20) C. returns a random number generator with a random value based on time


Related Posts


Share this

Related Posts

Previous
Next Post »