0% found this document useful (0 votes)
74 views2 pages

A. B. C. D.: Int Fun Is Overrided With Extern Int Fun

The document contains 10 multiple choice questions about C programming concepts such as data types, variable declarations, functions, operators, and type conversions. The questions cover topics like obtaining remainders of floating point divisions, variable declaration vs definition, built-in and user-defined data types, and external variable declarations.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views2 pages

A. B. C. D.: Int Fun Is Overrided With Extern Int Fun

The document contains 10 multiple choice questions about C programming concepts such as data types, variable declarations, functions, operators, and type conversions. The questions cover topics like obtaining remainders of floating point divisions, variable declaration vs definition, built-in and user-defined data types, and external variable declarations.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ? A.rem = 3.14 % 2.

1; B. rem = modf(3.14, 2.1); C. rem = fmod(3.14, 2.1); D.Remainder cannot be obtain in floating point division. 2.What are the types of linkages? A.Internal and External C. External and None

B. External, Internal and None D.Internal

3. Which of the following special symbol allowed in a variable name? A.* (asterisk) B. | (pipeline) C. - (hyphen) D._ (underscore) 4. Is there any difference between following declarations? 1 : extern int fun(); 2 : int fun(); A.Both are identical B. No difference, except extern int fun(); is probably in another file C. int fun(); is overrided with extern int fun(); D.None of these 5. How would you round off a value from 1.66 to 2.0? A.ceil(1.66) B. floor(1.66) C. roundup(1.66) D.roundto(1.66) 6. By default a real number is treated as a A.float C. long double

B. double D.far double

7.Which of the following is not user defined data type?


struct book { char name[10]; float price; int pages; };

1:

2 : long int l = 2.35; 3 : enum day {Sun, Mon, Tue, Wed}; A.1 C. 3

B. 2 D.Both 1 and 2

8. Is the following statement a declaration or definition? extern int i; A.Declaration B. Definition C. Function D.Error 9. Identify which of the following are declarations 1 : extern int x; 2 : float square ( float x ) { ... } 3 : double pow(double, double); A.1 B. 2 C. 1 and 3 D.3 10. In the following program where is the variable a getting defined and where it is getting declared?
#include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20;

A.extern int a is declaration, int a = 20 is the definition B. int a = 20 is declaration, extern int a is the definition C. int a = 20 is definition, a is not defined D.a is declared, a is not defined

You might also like