0% found this document useful (0 votes)
139 views

YCMOU C Program

The document contains multiple choice questions about C programming concepts. It tests knowledge in areas like data types, constants, keywords, operators, arithmetic statements, declarations, and more. The questions have a single correct answer that is either a letter choice or a short statement.

Uploaded by

Jennifer Norton
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

YCMOU C Program

The document contains multiple choice questions about C programming concepts. It tests knowledge in areas like data types, constants, keywords, operators, arithmetic statements, declarations, and more. The questions have a single correct answer that is either a letter choice or a short statement.

Uploaded by

Jennifer Norton
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 175

[1]

Which of the following statement is correct? Choice a A character constant in C will never be a digit or a symbol. Choice b Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. Choice c Choice d + is a character constant. Union is a primary constant.

Answer
[2]

(b)
auto if default elseif

Which of the following is not a keyword? Choice a Choice b Choice c Choice d

Answer
[3]

(d)
2.5 3 2 0

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d

Answer
[4]

(a)
An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767.

Which of the following statement is false? Choice a Choice b Choice c

Choice d

Negative integer constant is allowed in C.

Answer
[5]

(c)
Linux is written in C. Taking speed and time into consideration fast gaming framework is developed in C. C is a programming language which develops device driver programs.

Which of the following statement is correct? Choice a Choice b

Choice c

Choice d

All of the above.

Answer

(d)

[6]

Which of the following statement is incorrect? Choice a The type declaration statement is written at the beginning of main( ) function. Choice b Choice c Choice d The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer
[7]

(d)
Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d

Answer
[8]

(c)

Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer
[9]

(b)

Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer
[10]

(c)
float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

Answer
[11]

(c)
int a ; a=5; int a = 5 ;

Which of the following declaration is incorrect? Choice a Choice b

Choice c Choice d

int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
[12]

(c)
+ * = /

Which of the following is not an arithmetic operator? Choice a Choice b Choice c Choice d

Answer
[13]

(c)
Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Which of the following is not a type of arithmetic statement? Choice a Choice b Choice c Choice d

Answer
[14]

(c)
An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following statement is incorrect? Choice a

Choice b Choice c Choice d

Answer
[15]

(d)
i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Which of the following will cause error in code? Choice a Choice b Choice c Choice d

Answer
[16]

(a)
1 2 3 4

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d

Answer

(a)

[17]

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Subtraction operator. Multiplication.

Answer
[18]

(d)
When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. None of the above

Which of the following statement is correct? Choice a

Choice b

Choice c

Choice d

Answer
[19]

(c)
Arithmetic instruction. Control instruction. Hierarchy. Associativity.

The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d

Answer
[20]

(c)
Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

Which of the following statement is correct? Choice a Choice b Choice c

Choice d

Answer
[21]

( d)
Assignment operator. Addition operator. Modular division operator.

Which of the following operator has the lowest priority? Choice a Choice b Choice c

Choice d

Multiplication operator.

Answer
[22]

(d)
break continue None of the above

Which of the following keyword cannot be used within the switch statement? Choice a case Choice b Choice c Choice d

Answer
[23]

(d)

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer
[24]

(c)

Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Answer
[25]

(b)

Consider following code snippet:

[25] void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 1 1 Garbage value

Answer
[26]

(a)

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -12

Answer
[27]

(a)

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ;

Choice c Choice d

printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

Answer
[28]

(b)
float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d

Answer
[29] Consider following code snippet: void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required. Error: Rvalue required. Error: Function call missing. The code generates runtime exception.

Answer
[30]

(c)

Consider following code snippet: void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully

Answer

[1]

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d 2.5 3 2 0

Answer
[2]

(a)
An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant.

Which of the following statement is false? Choice a Choice b

Choice c

The allowable range for integer constant is 32767 to +32767.

Choice d

Negative integer constant is allowed in C.

Answer
[3]

(c)
auto if default elseif

Which of the following is not a keyword? Choice a Choice b Choice c Choice d

Answer
[4]

(d)
A character constant in C will never be a digit or a symbol.

Which of the following statement is correct? Choice a

Choice b

Range of real constants expressed in exponential form is 3.4e38 to 3.3e38.

Choice c Choice d

+ is a character constant. Union is a primary constant.

Answer
[5]

(c)
Linux is written in C. Taking speed and time into consideration fast gaming

Which of the following statement is correct? Choice a Choice b

framework is developed in C. Choice c C is a programming language which develops device driver programs. Choice d All of the above.

Answer
[6]

(d)
float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

Answer
[7]

(c)
Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d

Answer

(c)

Which of the following part of integrated [8] development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer

(c)

[9]

Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer

(b)

[10]

Which of the following statement is incorrect? Choice a The type declaration statement is written at the beginning of main( ) function. Choice b Choice c Choice d The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer
[11]

(d)
int a ; a=5;

Which of the following declaration is incorrect? Choice a

Choice b Choice c Choice d

int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
[12]

(c)
An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following statement is incorrect? Choice a

Choice b Choice c Choice d

Answer

(d)

Which of the following is not a type of arithmetic [13] statement? Choice a Choice b Choice c Choice d Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Answer
[14]

(c)
+

Which of the following is not an arithmetic operator? Choice a

Choice b Choice c Choice d

* = /

Answer
[15]

(c)
i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Which of the following will cause error in code? Choice a Choice b Choice c Choice d

Answer
[16]

(a)
1 2 3 4

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d

Answer

(a)

[17]

The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d Arithmetic instruction. Control instruction. Hierarchy. Associativity.

Answer
[18]

(c)
When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. None of the above

Which of the following statement is correct? Choice a

Choice b

Choice c

Choice d

Answer
[19]

(c)
Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

Which of the following statement is correct? Choice a Choice b Choice c

Choice d

Answer

(d)

[20]

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Subtraction operator. Multiplication.

Answer
[21]

(d)
Assignment operator. Addition operator. Modular division operator. Multiplication operator

Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d

Answer

(a)

[22]

Which of the following keyword cannot be used within the switch statement? Choice a Choice b Choice c Choice d case break continue None of the above

Answer

(d)

Consider following code snippet:

[23]

void main( ) { [23] } What would be the output of above code? Choice a Choice b Choice c Choice d tt tt tt tt tt tt tt tt tt/t tt/t tt tt printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ;

tt \t tt\t tt /t tt/t

Answer

(b)

[24]

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -12

Answer

(a)

[25]

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Choice a Learning\C\is\great\enjoyment.

Choice b Choice c Choice d

Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer

(b)

[26]

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 1 1 Garbage value

Answer
[27]

(b)

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b Choice c printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ;

Choice d

printf ( "%d", j = i + 2 f * ch ) ;

Answer
[28]

(b)
float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d

Answer
[29] Consider following code snippet: void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully.

Answer
Which of the following code snippet will give output as 10? Choice a void main( ) { int i = 10 ; printf ( "%d", i ) ; } Choice b void main( ) { printf ( "%d", 10 ) ; } Choice c void main( ) {

[30]

printf ( "%d", i = 10 ) ; } Choice d All of the above.

Answer

(a)

[1] If a is a float variable, a = 5/2 ; will return a Choice a Choice b Choice c Choice d

[2] Which of the following statement is false? Choice a Choice b

Choice c

Choice d

[3] Which of the following is not a keyword? Choice a Choice b Choice c Choice d

[4] Which of the following statement is correct? Choice a

Choice b

Choice c Choice d

[5] Which of the following statement is correct? Choice a Choice b

Choice c

Choice d

[6] Which of the following statement is incorrec Choice a Choice b Choice c Choice d

[7] Type declaration instructions are used to de Choice a Choice b Choice c Choice d

[8] Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d

[9] Which of the following translates a C langua program to machine language program? Choice a Choice b Choice c Choice d

[10] Which of the following statement is incorrec Choice a

Choice b Choice c Choice d

[11] Which of the following declaration is incorre Choice a

Choice b Choice c Choice d

[12] Which of the following statement is incorrec Choice a

Choice b Choice c Choice d

[13]

Choice a Choice b Choice c Choice d

[14] Which of the following is not an arithmetic o Choice a

Choice b Choice c Choice d

[15] Which of the following will cause error in co Choice a Choice b Choice c Choice d

[16] How many variables C allows on left side of Choice a Choice b Choice c Choice d

[17] The priority or precedence in which the oper Choice a Choice b Choice c Choice d

arithmetic statement are performed is called

[18] Which of the following statement is correct? Choice a

Choice b

Choice c

Choice d

[19] Which of the following statement is correct? Choice a Choice b Choice c

Choice d

[20] Which of the following operator has the high Choice a Choice b Choice c Choice d

[21] Which of the following operator has the low Choice a Choice b Choice c Choice d

[22] Which of the following keyword cannot be u Choice a Choice b Choice c Choice d

[23] Consider following code snippet:

[23] void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d

[24]

Choice a Choice b Choice c Choice d

[25]

Choice a

Choice b Choice c Choice d

[26]

Choice a Choice b Choice c Choice d

[27] Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b Choice c

Choice d

[28] Which of the following declaration is incorre Choice a Choice b Choice c Choice d

[29] Consider following code snippet: void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d

[30] Which of the following code snippet will give output as 10? Choice a

Choice b

Choice c

Choice d

at variable, a = 5/2 ; will return a value 2.5 3 2 0

he following statement is false? An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

he following is not a keyword? auto if default elseif

he following statement is correct? A character constant in C will never be a digit or a symbol. Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

he following statement is correct? Linux is written in C. Taking speed and time into consideration fast gaming

framework is developed in C. C is a programming language which develops device driver programs. All of the above.

he following statement is incorrect? float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

ration instructions are used to declare Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

he following part of integrated

nt environment is used to Editor Compiler Preprocessor Linker

ferent files in one file?

he following translates a C language Editor Compiler Preprocessor Linker

o machine language program?

he following statement is incorrect? The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

he following declaration is incorrect? int a ; a=5; int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

he following statement is incorrect? An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following is not a type of arithmetic statement? Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

he following is not an arithmetic operator? +

* = /

he following will cause error in code? i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

variables C allows on left side of =? 1 2 3 4

y or precedence in which the operations in an Arithmetic instruction. Control instruction. Hierarchy. Associativity.

statement are performed is called

he following statement is correct? When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. None of the above

he following statement is correct? Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

he following operator has the highest priority? Assignment operator. Addition operator. Subtraction operator. Multiplication.

he following operator has the lowest priority? Assignment operator. Addition operator. Modular division operator. Multiplication operator

he following keyword cannot be used within the switch statement? case break continue None of the above

ollowing code snippet:

tt \t tt\t ) ;

tt /t tt/t ) ;

d be the output of above code? tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? 0 6 -6 0 00 -12

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Learning\C\is\great\enjoyment.

Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; } What would be the output of above code? 0 1 1 Garbage value

ollowing code snippet: ) j;

3.0 ;

= '*' ;

atement here

he following statement is to be

et the output 254 if the ASCII printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ;

s 42?

printf ( "%d", j = i + 2 f * ch ) ;

he following declaration is incorrect? float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

ollowing code snippet: )

, b = 2, c ;

c;

%d, c ) ;

he following statement is correct Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully.

above code?

he following code snippet will give void main( ) { int i = 10 ; printf ( "%d", i ) ; } void main( ) { printf ( "%d", 10 ) ; } void main( ) {

10?

printf ( "%d", i = 10 ) ; } All of the above.

[1]

Which of the following statement is false? Choice a Choice b An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. Choice c The allowable range for integer constant is 32767 to +32767. Choice d Negative integer constant is allowed in C.

Answer
[2]

(c)
A character constant in C will never be a digit or a symbol. Range of real constants expressed in exponential form is 3.4e38 to 3.3e38.

Which of the following statement is correct? Choice a

Choice b

Choice c Choice d

+ is a character constant. Union is a primary constant.

Answer
[3]

(c)
auto if default elseif

Which of the following is not a keyword? Choice a Choice b Choice c Choice d

Answer
[4]

(d)
2.5 3 2 0

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d

Answer
[5]

(a)
Linux is written in C. Taking speed and time into consideration fast gaming

Which of the following statement is correct? Choice a Choice b

framework is developed in C. Choice c C is a programming language which develops device driver programs. Choice d All of the above.

Answer

(d)

Which of the following part of integrated [6] development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer
[7]

(c)
Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d

Answer
[8]

(c)
The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Which of the following statement is incorrect? Choice a

Choice b Choice c Choice d

Answer

(d)

[9]

Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer
[10]

(b)
float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

Answer
[11]

(c)
int a ; a=5;

Which of the following declaration is incorrect? Choice a

Choice b Choice c Choice d

int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
[12]

(c)
An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following statement is incorrect? Choice a

Choice b Choice c Choice d

Answer
[13]

(d)
i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Which of the following will cause error in code? Choice a Choice b Choice c Choice d

Answer

(a)

[14]

Which of the following is not a type of arithmetic statement? Choice a Integer mode arithmetic statement.

Choice b Choice c Choice d

Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Answer
[15]

(c)
+ * = /

Which of the following is not an arithmetic operator? Choice a Choice b Choice c Choice d

Answer
[16]

(c)
1 2 3 4

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d

Answer
[17]

(a)
Assignment operator. Addition operator. Subtraction operator. Multiplication.

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d

Answer

(d)

[18]

Which of the following statement is correct? Choice a When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. Choice c In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. None of the above

Choice b

Choice d

Answer

(c)

[19]

The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d Arithmetic instruction. Control instruction. Hierarchy. Associativity.

Answer
[20]

(c)
Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

Which of the following statement is correct? Choice a Choice b Choice c

Choice d

Answer
[21]

(d)
Assignment operator. Addition operator. Modular division operator. Multiplication operator.

Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d

Answer

(a)

[22]

Which of the following keyword cannot be used within the switch statement? Choice a Choice b Choice c Choice d case break continue None of the above

Answer

(d)

Consider following code snippet:

[23]

void main( ) [23] { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer

(b)

Consider following code snippet: void main( ) { int a, b ; [24] a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -12

Answer

(a)

Consider following code snippet: void main( ) { [25] } What would be the output of above code? float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ;

Choice a Choice b Choice c Choice d

0 1 1 Garbage value

Answer
[26]

(b)

Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Answer
[27]

(b)

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b Choice c Choice d printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

Answer

(b)

[28]

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

Answer
[29] Consider following code snippet: void main( ) { int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully.

Answer

[30]

Which of the following code snippet will give output as 10? Choice a void main( ) { int i = 10 ; printf ( "%d", i ) ; } Choice b void main( ) { printf ( "%d", 10 ) ; } Choice c void main( ) { printf ( "%d", i = 10 ) ; }

Choice d

All of the above.

Answer

(a)

[1] Which of the following statemen Choice a Choice b

Choice c

Choice d

[2] Which of the following statemen Choice a

Choice b

Choice c Choice d

[3] Which of the following is not a ke Choice a Choice b Choice c Choice d

[4] If a is a float variable, a = 5/2 ; Choice a Choice b Choice c Choice d

[5] Which of the following statemen Choice a Choice b

Choice c

Choice d

[6] Which of the following part of int

development environment is use Choice a Choice b Choice c Choice d

include different files in one file?

[7] Type declaration instructions are Choice a Choice b Choice c Choice d

[8] Which of the following statemen Choice a

Choice b Choice c Choice d

[9] Which of the following translates Choice a Choice b Choice c Choice d

program to machine language pr

[10] Which of the following statemen Choice a Choice b Choice c Choice d

[11] Which of the following declaratio Choice a

Choice b Choice c Choice d

[12] Which of the following statemen Choice a

Choice b Choice c Choice d

[13] Which of the following will cause Choice a Choice b Choice c Choice d

[14] Choice a

Choice b Choice c Choice d

[15] Which of the following is not an Choice a Choice b Choice c Choice d

[16] How many variables C allows on Choice a Choice b Choice c Choice d

[17] Which of the following operator Choice a Choice b Choice c Choice d

[18] Which of the following statemen Choice a

Choice b

Choice c

Choice d

[19] The priority or precedence in wh Choice a Choice b Choice c Choice d

arithmetic statement are perform

[20] Which of the following statemen Choice a Choice b Choice c

Choice d

[21] Which of the following operator Choice a Choice b Choice c Choice d

[22] Which of the following keyword

Choice a Choice b Choice c Choice d

[23] Consider following code snippet:

[23] void main( ) { }

printf ( "Learning\C\is\great\

What would be the output of abo Choice a Choice b Choice c Choice d

[24] Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); }

printf ( a = %d b = %d, a, b

What would be the output of abo Choice a Choice b Choice c Choice d

[25] Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; }

What would be the output of abo

Choice a Choice b Choice c Choice d

[26] Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; }

What would be the output of abo Choice a Choice b Choice c Choice d

[27] Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here }

Which of the following statemen value of * is 42? Choice a Choice b Choice c Choice d

added to get the output 254 if th

[28] Which of the following declaratio Choice a Choice b Choice c Choice d

[29] Consider following code snippet: void main( ) { int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; }

Which of the following statemen about the above code? Choice a Choice b Choice c Choice d

[30] Choice a

Choice b

Choice c

Choice d

Which of the following statement is false? An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

Which of the following statement is correct? A character constant in C will never be a digit or a symbol. Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

Which of the following is not a keyword? auto if default elseif

If a is a float variable, a = 5/2 ; will return a value 2.5 3 2 0

Which of the following statement is correct? Linux is written in C. Taking speed and time into consideration fast gaming

framework is developed in C. C is a programming language which develops device driver programs. All of the above.

Which of the following part of integrated development environment is used to include different files in one file? Editor Compiler Preprocessor Linker

Type declaration instructions are used to declare Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Which of the following statement is incorrect? The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Which of the following translates a C language program to machine language program? Editor Compiler Preprocessor Linker

Which of the following statement is incorrect? float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following declaration is incorrect? int a ; a=5; int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Which of the following statement is incorrect? An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following will cause error in code? i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

[14] Which of the following is not a type of arithmetic statement? Integer mode arithmetic statement.

Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Which of the following is not an arithmetic operator? + * = /

How many variables C allows on left side of =? 1 2 3 4

Which of the following operator has the highest priority? Assignment operator. Addition operator. Subtraction operator. Multiplication.

Which of the following statement is correct? When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. None of the above

The priority or precedence in which the operations in an arithmetic statement are performed is called Arithmetic instruction. Control instruction. Hierarchy. Associativity.

Which of the following statement is correct? Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

Which of the following operator has the lowest priority? Assignment operator. Addition operator. Modular division operator. Multiplication operator.

Which of the following keyword cannot be used within the switch statement?

case break continue None of the above

Consider following code snippet:

void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? 0 6 -6 0 00 -12

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; } What would be the output of above code?

0 1 1 Garbage value

Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

Which of the following declaration is incorrect? float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

Consider following code snippet: void main( ) { int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; } Which of the following statement is correct about the above code? Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully.

[30] Which of the following code snippet will give output as 10? void main( ) { int i = 10 ; printf ( "%d", i ) ; } void main( ) { printf ( "%d", 10 ) ; } void main( ) { printf ( "%d", i = 10 ) ; }

All of the above.

[1]

Which of the following statement is false? Choice a Choice b An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. Choice c The allowable range for integer constant is 32767 to +32767. Choice d Negative integer constant is allowed in C.

Answer
[2]

(c)
A character constant in C will never be a digit or a symbol.

Which of the following statement is correct? Choice a

Choice b

Range of real constants expressed in exponential form is 3.4e38 to 3.3e38.

Choice c Choice d

+ is a character constant. Union is a primary constant.

Answer
[3] Which of the following is not a keyword? Choice a Choice b Choice c Choice d auto if default elseif

Answer
[4]

(d)
2.5 3 2 0

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d

Answer
[5]

(a)
Linux is written in C. Taking speed and time into consideration fast gaming

Which of the following statement is correct? Choice a Choice b

framework is developed in C. Choice c C is a programming language which develops device driver programs. Choice d All of the above.

Answer
[6]

(d)
Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d

Answer

(c)

[7]

Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer

(b)

Which of the following part of integrated [8] development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Answer
[9]

(c)
float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

Answer

(c)

[10]

Which of the following statement is incorrect? Choice a The type declaration statement is written at the beginning of main( ) function. Choice b Choice c Choice d The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer
[11]

(d)
int a ; a=5;

Which of the following declaration is incorrect? Choice a

Choice b Choice c Choice d

int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
[12]

(c)
i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Which of the following will cause error in code? Choice a Choice b Choice c Choice d

Answer

(a)

[13]

Which of the following is not a type of arithmetic statement? Choice a Choice b Choice c Choice d Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Answer
[14]

(c)
+ *

Which of the following is not an arithmetic operator? Choice a Choice b

Choice c Choice d

= /

Answer
[15]

(c)
An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present

Which of the following statement is incorrect? Choice a

Choice b Choice c Choice d

Answer

(d)

[16]

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d 1 2 3 4

Answer

(a)

[17]

Which of the following statement is correct? Choice a Choice b Choice c Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. Choice d The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

Answer

(d)

[18]

The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Arithmetic instruction. Control instruction. Hierarchy.

Choice d

Associativity.

Answer

(c)

[19]

Which of the following statement is correct? Choice a When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. Choice c In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. None of the above

Choice b

Choice d

Answer
[20]

(c)
Assignment operator. Addition operator. Subtraction operator. Multiplication.

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d

Answer

(d)

[21]

Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Modular division operator. Multiplication operator.

Answer

(a)

[22]

Which of the following keyword cannot be used within the switch statement? Choice a Choice b Choice c Choice d case break continue None of the above

Answer
[23]

(d)

Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Answer

(b)

[24]

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -12

Answer
[25]

(a)

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; }

What would be the output of above code? Choice a Choice b Choice c Choice d 0 1 1 Garbage value

Answer
[26]

(b)

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer

(b)

[27]

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a printf ( "%d", j = i + 2 * * ch ) ;

Choice b Choice c Choice d

printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

Answer

(b)

[28]

Consider following code snippet: extern int i ; Which of the following statement is correct about above code? Choice a Choice b Choice c Choice d It is a declaration. It is a definition. It is declaration as well as definition. It is neither declaration nor definition.

Answer
[29]

(a)

Consider following code snippet: void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required. Error: Rvalue required. Error: Function call missing. The code generates runtime exception.

Answer
[30]

(c)

Consider following code snippet: void main( ) { int x = 1, y = 1 ; x+y=2;

printf ( %d, ( x + y ) ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully.

Answer

[1] Which of the following statement is false? Choice a Choice b

Choice c

Choice d

[2] Which of the following statement is correct? Choice a

Choice b

Choice c Choice d

[3] Which of the following is not a keyword? Choice a Choice b Choice c Choice d

[4] If a is a float variable, a = 5/2 ; will return a Choice a Choice b Choice c Choice d

[5] Which of the following statement is correct? Choice a Choice b

Choice c

Choice d

[6] Type declaration instructions are used to de Choice a Choice b Choice c Choice d

[7] Which of the following translates a C langua program to machine language program? Choice a Choice b Choice c Choice d

[8] Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d

[9] Which of the following statement is incorrec Choice a Choice b Choice c Choice d

[10] Which of the following statement is incorrec Choice a

Choice b Choice c Choice d

[11] Which of the following declaration is incorre Choice a

Choice b Choice c Choice d

[12] Which of the following will cause error in co Choice a Choice b Choice c Choice d

[13] Which of the following is not a type of arithm statement? Choice a Choice b Choice c Choice d

[14] Which of the following is not an arithmetic o Choice a Choice b

Choice c Choice d

[15] Which of the following statement is incorrec Choice a

Choice b Choice c Choice d

[16] How many variables C allows on left side of Choice a Choice b Choice c Choice d

[17] Choice a Choice b Choice c

Choice d

[18] The priority or precedence in which the oper Choice a Choice b Choice c

arithmetic statement are performed is called

Choice d

[19] Which of the following statement is correct? Choice a

Choice b

Choice c

Choice d

[20] Which of the following operator has the high Choice a Choice b Choice c Choice d

[21] Choice a Choice b Choice c Choice d

[22] Which of the following keyword cannot be u statement? Choice a Choice b Choice c Choice d

[23] Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d

[24]

Choice a Choice b Choice c Choice d

[25] Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; }

What would be the output of above code? Choice a Choice b Choice c Choice d

[26] Consider following code snippet: void main( ) { } What would be the output of above code? Choice a Choice b Choice c Choice d

printf ( "Learning\C\is\great\enjoyment

[27] Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a

Choice b Choice c Choice d

[28] Consider following code snippet: extern int i ; Which of the following statement is correct about above code? Choice a Choice b Choice c Choice d

[29] Consider following code snippet: void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d

[30] Consider following code snippet: void main( ) { int x = 1, y = 1 ; x+y=2;

printf ( %d, ( x + y ) ) ; } Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d

he following statement is false? An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

he following statement is correct? A character constant in C will never be a digit or a symbol. Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

he following is not a keyword? auto if default elseif

at variable, a = 5/2 ; will return a value 2.5 3 2 0

he following statement is correct? Linux is written in C. Taking speed and time into consideration fast gaming

framework is developed in C. C is a programming language which develops device driver programs. All of the above.

ration instructions are used to declare Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

he following translates a C language Editor Compiler Preprocessor Linker

o machine language program?

he following part of integrated

nt environment is used to Editor Compiler Preprocessor Linker

ferent files in one file?

he following statement is incorrect? float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

he following statement is incorrect? The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

he following declaration is incorrect? int a ; a=5; int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

he following will cause error in code? i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

he following is not a type of arithmetic Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

he following is not an arithmetic operator? + *

= /

he following statement is incorrect? An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present

variables C allows on left side of =? 1 2 3 4

Which of the following statement is correct? Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

y or precedence in which the operations in an Arithmetic instruction. Control instruction. Hierarchy.

statement are performed is called

Associativity.

he following statement is correct? When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. None of the above

he following operator has the highest priority? Assignment operator. Addition operator. Subtraction operator. Multiplication.

Which of the following operator has the lowest priority? Assignment operator. Addition operator. Modular division operator. Multiplication operator.

he following keyword cannot be used within the switch ? case break continue None of the above

ollowing code snippet: )

tt \t tt\t ) ;

tt /t tt/t ) ;

d be the output of above code? tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? 0 6 -6 0 00 -12

ollowing code snippet: ) 1, y = 1, z ;

%d, z = ( x / y ) ) ;

d be the output of above code? 0 1 1 Garbage value

ollowing code snippet: )

"Learning\C\is\great\enjoyment." ) ;

d be the output of above code? Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

ollowing code snippet: ) j;

3.0 ;

= '*' ;

atement here

he following statement is to be

et the output 254 if the ASCII printf ( "%d", j = i + 2 * * ch ) ;

s 42?

printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

ollowing code snippet: ;

he following statement is correct It is a declaration. It is a definition. It is declaration as well as definition. It is neither declaration nor definition.

ve code?

ollowing code snippet: )

c, d ;

%d, d = a + 2 b c ) ;

he following statement is correct Error: Lvalue required. Error: Rvalue required. Error: Function call missing. The code generates runtime exception.

above code?

ollowing code snippet: )

,y=1;

2;

%d, ( x + y ) ) ;

he following statement is correct Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully.

above code?

[1]

Which of the following statement Choice a is correct? A character constant in C will never be a digit or a symbol. Choice b Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

[1]

Choice c Choice d

Answer
[2]

(b)

[2]

Which of the following is not a a keyword? Choice auto Choice b Choice c Choice d if default elseif

Answer
[3]

(d)
[3]

If a is a float variable, a = 5/2 a ; will return a 2.5 Choice Choice b Choice c Choice d 3 2 0

Answer
[4]

(a)
[4]

Which of the following statement Choice a is false? An integer constant must have at least one digit. Choice b No commas or blanks are allowed within an integer constant. Choice c The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

Choice d

Answer
[5]

(c)
[5]

Which of the following statement Choice a is correct? Linux is written in C. Choice b Taking speed and time into consideration fast gaming framework is developed in C.

Choice c

C is a programming language which develops device driver programs. All of the above.

Choice d

Answer
[6]

(d)
[6]

Which of the following statement Choice a is The type declaration statement is written at the beginning of main( ) function. Choice b Choice c Choice d The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer
[7] Type declaration instructions are used Choice a Choice b Choice c Choice d

(d)
[7] Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Answer
[8] Which of the following translates amachine C program to language Choice a program? Choice b Choice c Choice d

(c)
[8]

Editor Compiler Preprocessor Linker

Answer
[9] Which of the following part of integrated development environment is used include different files in one file? Choice a Choice b Choice c Choice d

(b)
[9]

Editor Compiler Preprocessor Linker

Answer

(c)

[10] [10] Which of the following statement Choice a is float a = 1.99 + 2.4 + 1.45 ; Choice b Choice c Choice d float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Answer
[11]

(c)
[11]

Which of the following declaration is Choice a int a ; a=5; Choice b Choice c Choice d int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
[12]

(c)
[12]

Which of the following is not an Choice a arithmetic + Choice b Choice c Choice d * = /

Answer
[13] Which of the following is not a type of statement? Choice a Choice b Choice c Choice d

(c)

Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

[13]

Answer
[14]

(c)

Which of the following statement Choice a is An arithmetic instruction is often used for storing character constants in character variable. Choice b Choice c Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly.

[14]

Choice d

Operator for performing exponentiation is present.

Answer
[15]

(d)
[15]

Which of the following will cause Choice a error in i=a+b; Choice b Choice c Choice d x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Answer
[16]

(a)
[16]

How many variables C allows Choiceon a left side of 1 Choice b Choice c Choice d 2 3 4

Answer
[17]

(a)
[17]

Which of the following operator Choice a has the Assignment operator. Choice b Choice c Choice d Addition operator. Subtraction operator. Multiplication.

Answer
[18]

(d)

Which of the following statement Choice a is correct? When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Choice b Left to Right associativity means that the left operand must be ambiguous. Choice c In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. None of the above

[18]

Choice d

Answer

(c)

[19]

The priority or precedence in which arithmetic statement are performed is Choice a Choice b Choice c Choice d Arithmetic instruction. Control instruction. Hierarchy. Associativity. [19]

Answer
[20]

(c)

Which of the following statement Choice a is correct? Assignment operator enjoys highest priority. Choice b The operations within outermost parentheses are performed first. Choice c In C, BODMAS rule is applicable for evaluation of arithmetic expressions. Choice d The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations. [20]

Answer
[21]

( d)

Which of the following operator Choice a has the Assignment operator. Choice b Choice c Choice d Addition operator. Modular division operator. Multiplication operator. [21]

Answer
[22]

(d)

Which of the following keyword Choice a cannot be case Choice b Choice c Choice d break continue None of the above [22]

Answer
[23] Consider following code snippet: void main( )

(d)

[23]

[23]

{ printf ( "Learning\C\is\great } What would be the output Choice of a above code? Learning\C\is\great\enjoyment. Choice b Choice c Choice d Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer
[24] Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; }

(c)
[24]

What would be the output Choice of a above code? tt tt tt tt Choice b tt tt tt/t tt/t

Choice c Choice d

tt

tt

tt

tt

tt \t tt\t tt /t tt/t

Answer
[25] Consider following code snippet: void main( ) {

(b)

[25]

float x = 1, y = 1, z ; printf ( %d, z = ( x }/y)); What would be the output Choice of a above code? 0

Choice b Choice c Choice d

1 1 Garbage value

Answer
[26] Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; }

(a)

[26]

What would be the output Choice of a above code? 0 6 Choice b Choice c Choice d -6 0 00 -12

Answer

(a)

[27]

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if42? the value of * is Choice a Choice b Choice c Choice d printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ; [27]

Answer

(b)

[28]

Which of the following declaration is Choice a float mes = 123.56 ; Choice b Choice c Choice d char con = T * A ; int this = T * 20 ; int a + 3 = b ; [28]

Answer
[29] Consider following code snippet: void main( ) { int a, b, c, d ; printf ( %d, d = a + } 2bc); Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required. Error: Rvalue required. Error: Function call missing. The code generates runtime exception.

[29]

Answer
[30] Consider following code snippet: void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; }

(c)

[30]

Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully

Answer
If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d

[1]

Answer
[2] Which of the following statement Choice a is false? Choice b

Choice c

Choice d

Answer
[3] Which of the following is not a keyword? Choice a Choice b Choice c Choice d

Answer
Which of the following statement is correct?

[4]

Choice a Choice b Choice c Choice d

Answer
Which of the following statement is correct?

[5]

Choice a Choice b

Choice c Choice d

Answer
Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

[6]

Answer
[7] Type declaration instructions are used to declare Choice a Choice b Choice c Choice d

Answer
[8] Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d

Answer
Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d

[9]

Answer

[10]

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

Answer
Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d

[11]

Answer
Which of the following statement is incorrect? Choice a Choice b Choice c Choice d

[12]

Answer

[13]

Which of the following is not a type of arithmetic statement? Choice a Choice b Choice c Choice d

Answer
Which of the following is not an arithmetic operator? Choice a Choice b Choice c

[14]

Choice d

Answer
Which of the following will cause error in code? Choice a Choice b Choice c Choice d

[15]

Answer
[16] How many variables C allows on left side of =? Choice a Choice b Choice c Choice d

Answer
The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d

[17]

Answer
Which of the following statement is correct?

[18]

Choice a Choice b Choice c Choice d

Answer
Which of the following statement is correct?

[19]

Choice a Choice b Choice c Choice d

Answer

[20]

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d

Answer
Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d

[21]

Answer
Which of the following keyword cannot be used within the switch statement? Choice a Choice b Choice c Choice d

[22]

Answer
[23] Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; }

What would be the output of above code? Choice a Choice b Choice c Choice d

Answer

[24]

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d

Answer

[25]

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great \enjoyment." ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d

Answer

[26]

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x/y)); } What would be the output of above code? Choice a Choice b Choice c Choice d

Answer
[27] Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b Choice c Choice d

Answer

[28]

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d

Answer
[29] Consider following code snippet: void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; } Which of the following statement is correct

about the above code? Choice a Choice b Choice c Choice d

Answer
[30] Which of the following code snippet will give output as 10? Choice a

Choice b

Choice c

Choice d

Answer

If a is a float variable, Choice a a = 5/2 Choice b Choice c Choice d

[1] 2.5 3 2 0

Answer
Which of the following Choice a Choice b

(a)

An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. [2]

Choice c

The allowable range for integer constant is 32767 to +32767.

Choice d

Negative integer constant is allowed in C.

Answer
Which of the following Choice a is not a Choice b Choice c Choice d

(c)
auto if default elseif [3]

Answer
Which of the following Choice a

(d)
A character constant in C will never be a digit or a symbol. [4]

Choice b

Range of real constants expressed in exponential form is 3.4e38 to 3.3e38.

Choice c Choice d

+ is a character constant. Union is a primary constant.

Answer
Which of the following Choice a Choice b

(c)
[5] Linux is written in C. Taking speed and time into consideration fast gaming framework is developed in C.

Choice c

C is a programming language which develops device driver programs.

Choice d

All of the above.

Answer
Which of the following Choice a Choice b Choice c Choice d

(d)
float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ; [6]

Answer
Type declaration instructions are Choice a Choice b Choice c Choice d

(c)

Type of constants. Keyword. Type of variables. Type of arithmetic to be performed. [7]

Answer
Which of the following part of development environment is include different files in one Choice a file? Choice b Choice c Choice d

(c)

[8] Editor Compiler Preprocessor Linker

Answer
Which of the following program to machine Choice a Choice b Choice c Choice d

(c)

Editor Compiler Preprocessor Linker

[9]

Answer

(b)

Which of the following Choice a

The type declaration statement is written at the beginning of main( ) function.

[10]

Choice b Choice c Choice d

The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer
Which of the following Choice a Choice b Choice c Choice d

(d)
[11] int a ; a=5; int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer
Which of the following Choice a

(c)
[12] An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Choice b Choice c Choice d

Answer

(d)
[13]

Which of the following is not a statement? Choice a Choice b Choice c Choice d Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Answer
Which of the following Choice a is not Choice b

(c)
[14] + *

Choice c Choice d

= /

Answer
Which of the following Choice a will Choice b Choice c Choice d

(c)
[15] i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Answer
How many variables Choice a C Choice b Choice c Choice d

(a)
[16] 1 2 3 4

Answer
The priority or precedence arithmetic in statement are Choice a Choice b Choice c Choice d

(a)
[17]

Arithmetic instruction. Control instruction. Hierarchy. Associativity.

Answer
Which of the following Choice a

(c)
[18] When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous.

Choice b

Choice c

In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. None of the above

Choice d

Answer
Which of the following Choice a Choice b Choice c

(c)
Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations. [19]

Choice d

Answer

(d)

[20]

Which of the following Choice a

Assignment operator.

Choice b Choice c Choice d

Addition operator. Subtraction operator. Multiplication.

Answer
Which of the following Choice a Choice b Choice c Choice d

(d)
[21] Assignment operator. Addition operator. Modular division operator. Multiplication operator

Answer
Which of the following Choice a Choice b Choice c Choice d

(a)
[22] case break continue None of the above

Answer
Consider following code

(d)

[23]

void main( ) { printf ( tt \t tt\t ) ; ( tt /t print tt/t ); } What would be the output of Choice a Choice b Choice c Choice d [23]

tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Answer

(b)

Consider following code void main( ) { int a, b ; a=-3--3; b=-3--(-3 ) ; printf ( a = %d b = %d, a, } What would be the output of above code? Choice a Choice b Choice c Choice d

[24]

0 6 -6 0 00 -12

Answer

(a)

Consider following code snippet: void main( ) { printf ( "Learning\C\is\ }

[25]

[25] What would be the output Choice a of Choice b Choice c Choice d

Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Answer

(b)

[26]

Consider following code void main( ) { float x = 1, y = 1, z ; printf ( %d, z = } (x/y));

What would be the output of above code? Choice a Choice b Choice c Choice d

0 1 1 Garbage value [27]

Answer
Consider following code void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following added to get the output 254 if the value of * is 42?

(b)

Choice a Choice b Choice c Choice d

printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ; [28]

Answer
Which of the following Choice a Choice b Choice c Choice d

(b)

float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ; [29]

Answer
Consider following code void main( ) { int a = 5, b = 2, a c; +b=c; printf ( %d, c); }

Which of the following about the above code? Choice a Choice b Choice c Choice d

Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully. [30]

Answer
Which of the following output as code 10? Choice a void main( ) { int i = 10 ; printf ( "%d", i ) ; } Choice b void main( ) {

printf ( "%d", 10 ) ; } Choice c void main( )

{ printf ( "%d", i = 10 ) ; } Choice d All of the above.

Answer

(a)

Which of the following statement is false? Choice a Choice b An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. Choice c The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

[1]

Which of the following statemen Choice a Choice b

Choice c

Choice d

Choice d

Answer

(c)
[2] A character constant in C will never be a digit or a symbol.

Answer

Which of the following statement is correct? Choice a

Which of the following statemen Choice a

Choice b

Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

Choice b

Choice c Choice d

Choice c Choice d

Answer

(c)
[3]

Answer

Which of the following is not a keyword? Choice a Choice b Choice c Choice d auto if default elseif

Which of the following is not a k Choice a Choice b Choice c Choice d

Answer

(d)
[4]

Answer

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d 2.5 3 2 0

If a is a float variable, a = 5/2 ; Choice a Choice b Choice c Choice d

Answer

(a)
[5] Linux is written in C. Taking speed and time into consideration fast gaming framework is developed in C.

Answer

Which of the following statement is correct? Choice a Choice b

Which of the following statemen Choice a Choice b

Choice c

C is a programming language which develops device driver programs. All of the above.

Choice c

Choice d

Choice d

Answer

(d)
[6]

Answer

Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Type declaration instructions ar Choice a Choice b Choice c Choice d

Answer

Answer

(c)

Which of the following translate [7]

program to machine language p Choice a Choice b Choice c Choice d

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Answer

Answer

(c)
[8] The type declaration statement is written at the beginning of main( ) function.

Which of the following part of in Which of the following statement is incorrect? Choice a

development environment is use

include different files in one file Choice a Choice b Choice c Choice d

Choice b Choice c Choice d

The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Answer

(d)
[9]

Answer

Which of the following translates a C language program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Which of the following statemen Choice a Choice b Choice c Choice d

Answer

Answer

(b)

[10] Which of the following statement is incorrect? Choice a Choice b Choice c Choice d float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following statemen Choice a

Choice b Choice c Choice d

Answer

(c)
[11] int a ; a=5;

Answer

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d

Which of the following declarati Choice a Choice b Choice c Choice d

int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Answer

(c)
[12] An arithmetic instruction is often used for storing character constants in character variable.

Answer

Which of the following statement is incorrect? Choice a

Which of the following will caus Choice a Choice b Choice c Choice d

Choice b Choice c Choice d

Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Answer

Answer

(d)
[13] statement? Choice a Choice b Choice c Choice d i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

Which of the following is not a t

Which of the following will cause error in code? Choice a Choice b Choice c Choice d

Answer

(a)
[14]

Answer

Which of the following is not an Choice a Choice b

Which of the following is not a type of arithmetic statement? Choice a Choice b Integer mode arithmetic statement. Real mode arithmetic statement.

Choice c Choice d

Choice c Choice d

Character mode arithmetic statement. Mixed mode arithmetic statement.

Answer

Answer

(c)
+ * = /

[15]

Which of the following statemen Choice a

Which of the following is not an arithmetic operator? Choice a Choice b Choice c Choice d Choice b Choice c Choice d

Answer

Answer

(c)
[16] 1 2 3 4 Choice a Choice b Choice c Choice d

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d

How many variables C allows on

Answer

(a)
Assignment operator. Addition operator. Subtraction operator. Multiplication. [17]

Answer

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d

Which of the following statemen Choice a Choice b Choice c

Answer

(d)
Choice d

Which of the following statement is correct? Choice a When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. Choice c In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. Choice d None of the above

Answer

Choice b

The priority or precedence in wh [18]

arithmetic statement are perfor Choice a Choice b Choice c

Answer

(c)

Choice d

Answer
The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d Arithmetic instruction. Control instruction. Hierarchy. Associativity. Choice b [19]

Which of the following statemen Choice a

Answer

(c)
Choice c

Which of the following statement is correct? Choice a Choice b Choice c Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. Choice d The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations. [20] Choice a Choice b Choice c Choice d Choice d

Answer

Which of the following operator

Answer

(d)

Answer
Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Modular division operator. Multiplication operator. [21]

Which of the following operator Choice a Choice b Choice c Choice d

Answer

(a)

Which of the following keyword cannot be used within the switch statement? Choice a case Choice b Choice c Choice d break continue None of the above [22]

Answer

Which of the following keyword statement? Choice a Choice b Choice c

Answer

(d)

Consider following code snippet:

Choice d

Answer
void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment. } void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; [23]

Consider following code snippet

What would be the output of ab Choice a Choice b Choice c Choice d

Answer

(b)
[24]

Answer

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } void main( ) { int a, b ; a=-3--3; b=-3--(-3);

Consider following code snippet

printf ( a = %d b = %d, a, b

} What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -12

What would be the output of ab Choice a Choice b Choice c Choice d

Answer

(a)

Answer
Consider following code snippet: [25] void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; void main( ) { float x = 1, y = 1, z ;

Consider following code snippet

} } What would be the output of above code? Choice a Choice b Choice c Choice d 0 1 1 Garbage value

printf ( %d, z = ( x / y ) ) ;

What would be the output of ab Choice a Choice b Choice c Choice d

Answer

(b)
[26]

Answer
Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; } } void main( ) {

Consider following code snippet

printf ( "Learning\C\is\great

What would be the output of above code? Choice a Choice b Choice c tt Choice d tt tt tt tt tt tt tt tt tt tt/t tt/t

What would be the output of ab Choice a Choice b Choice c

tt \t tt\t tt /t tt/t

Choice d

Answer

(b)

Consider following code snippet:

void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? Choice a Choice b Choice c printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; } [27]

Answer

Consider following code snippet void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here

Choice d

printf ( "%d", j = i + 2 f * ch ) ;

Which of the following statemen

Answer

(b)

added to get the output 254 if th value of * is 42? Choice a Choice b Choice c Choice d

Which of the following declaration is incorrect? Choice a Choice b Choice c Choice d float mes = 123.56 ; char con = T * A ; int this = T * 20 ; int a + 3 = b ;

Answer

Answer
Consider following code snippet: [28]

Consider following code snippet

void main( ) { int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; }

extern int i ;

Which of the following statemen about above code? Choice a Choice b Choice c

Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully. [29]

Choice d

Answer

Consider following code snippet

void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c )

Answer

Which of the following code snippet will give output as 10? Choice a void main( ) { int i = 10 ; printf ( "%d", i ) ; } Choice b void main( ) { printf ( "%d", 10 ) ; } [30]

Which of the following statemen about the above code? Choice a Choice b Choice c Choice d

Answer

Consider following code snippet

[30] Choice c void main( ) { printf ( "%d", i = 10 ) ; } Choice d All of the above. int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; } void main( ) {

Answer

(a)

Which of the following statemen about the above code? Choice a Choice b Choice c Choice d

Answer

Which of the following statement is false? An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

(c)
Which of the following statement is correct? A character constant in C will never be a digit or a symbol. Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. + is a character constant. Union is a primary constant.

Which of the following is not a keyword? auto if default elseif

(d)
If a is a float variable, a = 5/2 ; will return a value 2.5 3 2 0

(a)
Which of the following statement is correct? Linux is written in C. Taking speed and time into consideration fast gaming framework is developed in C.

C is a programming language which develops device driver programs. All of the above.

(d)
Type declaration instructions are used to declare Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

(c)
Which of the following translates a C language program to machine language program? Editor Compiler Preprocessor Linker

(b)
Which of the following part of integrated development environment is used to include different files in one file? Editor Compiler Preprocessor Linker

(c)
Which of the following statement is incorrect? float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

(c)

Which of the following statement is incorrect? The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

(d)
Which of the following declaration is incorrect? int a ; a=5; int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

(c)
Which of the following will cause error in code? i=a+b; x*y=z; avg = ( a + b + c + num ) / 4 ; a = b = c= d = 4 ;

(a)
Which of the following is not a type of arithmetic statement? Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

(c)
Which of the following is not an arithmetic operator? + * = /

(c)
Which of the following statement is incorrect? An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on <B>chars</B> are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present

(d)
How many variables C allows on left side of =? 1 2 3 4

(a)
Which of the following statement is correct? Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions. The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations.

(d)
The priority or precedence in which the operations in an

arithmetic statement are performed is called Arithmetic instruction. Control instruction. Hierarchy.

Associativity.

(c)

Which of the following statement is correct? When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Left to Right associativity means that the left operand must be ambiguous. In case of Right to Left associativity the right operand must not be involved in evaluation of any other subexpression. None of the above

(c)
Which of the following operator has the highest priority?

Assignment operator. Addition operator. Subtraction operator. Multiplication.

(d)
Which of the following operator has the lowest priority? Assignment operator. Addition operator. Modular division operator. Multiplication operator.

(a)

Which of the following keyword cannot be used within the switch statement? case break continue None of the above

(d)
Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; }

What would be the output of above code? tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

(b)
Consider following code snippet: void main( )

a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ;

What would be the output of above code? 0 6 -6 0 00 -12

(a)
Consider following code snippet: void main( ) { float x = 1, y = 1, z ;

printf ( %d, z = ( x / y ) ) ; }

What would be the output of above code? 0 1 1 Garbage value

(b)
Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; }

What would be the output of above code? Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

(b)

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here }

Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42? printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

(b)
Consider following code snippet:

extern int i ; Which of the following statement is correct about above code? It is a declaration. It is a definition. It is declaration as well as definition. It is neither declaration nor definition.

(a)
Consider following code snippet:

void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c ) ; } Which of the following statement is correct about the above code? Error: Lvalue required. Error: Rvalue required. Error: Function call missing. The code generates runtime exception.

(c)
Consider following code snippet:

void main( ) {

int x = 1, y = 1 ; x+y=2; printf ( %d, ( x + y ) ) ; }

Which of the following statement is correct about the above code? Error: Function call missing. Error: Lvalue required. Error: Rvalue required. The code runs successfully.

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

[30]

[31]

Which of the following statement is correct? Choice a -A character constant in C will never be a digit or a symbol. Choice b - Range of real constants expressed in exponential form is 3.4e38 to 3.3e38. Choice c - + is a character constant. Choice d - Union is a primary constant.

If a is a float variable, a = 5/2 ; will return a value Choice a Choice b Choice c Choice d 2.5 3 2 0

Which of the following statement is false? Choice a Choice b Choice c Choice d An integer constant must have at least one digit. No commas or blanks are allowed within an integer constant. The allowable range for integer constant is 32767 to +32767. Negative integer constant is allowed in C.

Which of the following is not a keyword? Choice a Choice b Choice c Choice d auto if default elseif

Which of the following statement is correct? Choice a Choice b Choice c Choice d Linux is written in C. Taking speed and time into consideration fast gaming framework is developed in C. C is a programming language which develops device driver programs. All of the above.

Which of the following translates a C language

program to machine language program? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d The type declaration statement is written at the beginning of main( ) function. The order of defining variables is always important. The variables can be initialized while declaring. None of the above

Type declaration instructions are used to declare Choice a Choice b Choice c Choice d Type of constants. Keyword. Type of variables. Type of arithmetic to be performed.

Which of the following part of integrated development environment is used to include different files in one file? Choice a Choice b Choice c Choice d Editor Compiler Preprocessor Linker

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d float a = 1.99 + 2.4 + 1.45 ; float a = 1.65, b = a + 2.2 ; float x = y + 2.34, y = 1.42 ; int a, b, c, d ; a = b = c = 10 ;

Which of the following declaration is incorrect? Choice a int a ;

a=5; Choice b Choice c Choice d int a = 5 ; int a = b= c = 5 ; int a, b, c ; a=b=c=5;

Which of the following statement is incorrect? Choice a Choice b Choice c Choice d An arithmetic instruction is often used for storing character constants in character variable. Arithmetic operations on chars are permissible. Arithmetic operators should be written explicitly. Operator for performing exponentiation is present.

Which of the following is not a type of arithmetic statement? Choice a Choice b Choice c Choice d Integer mode arithmetic statement. Real mode arithmetic statement. Character mode arithmetic statement. Mixed mode arithmetic statement.

Which of the following is not an arithmetic operator? Choice a Choice b Choice c Choice d + * = /

How many variables C allows on left side of =? Choice a Choice b Choice c Choice d 1 2 3 4

which of the following statement is correct? Choice a Choice b Choice c Assignment operator enjoys highest priority. The operations within outermost parentheses are performed first. In C, BODMAS rule is applicable for evaluation of arithmetic expressions.

Choice d The priority or precedence in which the operations in an arithmetic statement are performed is called the hierarchy of operations. The priority or precedence in which the operations in an arithmetic statement are performed is called Choice a Choice b Choice c Choice d Arithmetic instruction. Control instruction. Hierarchy. Associativity.

Which of the following statement is correct? Choice a When an expression contains two operators of equal priority the tie between them is settled using the hierarchy of the operators. Choice b Left to Right associativity means that the left operand must be ambiguous. Choice c In case of Right to Left associativity the right operand must not be involved in evaluation of any other sub-expression. Choice d None of the above

Which of the following operator has the highest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Subtraction operator. Multiplication.

Which of the following operator has the lowest priority? Choice a Choice b Choice c Choice d Assignment operator. Addition operator. Modular division operator. Multiplication operator.

Which of the following keyword cannot be used within the switch statement? Choice a Choice b Choice c Choice d case break continue None of the above

Consider following code snippet: void main( ) { int a, b ; a=-3--3; b=-3--(-3); printf ( a = %d b = %d, a, b ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 6 -6 0 00 -6 -6

Consider following code snippet: void main( ) { printf ( tt \t tt\t ) ; print ( tt /t tt/t ) ; }

What would be the output of above code? Choice a Choice b Choice c Choice d tt tt tt tt tt tt tt tt tt/t tt/t tt tt

tt \t tt\t tt /t tt/t

Consider following code snippet: void main( ) { printf ( "Learning\C\is\great\enjoyment." ) ; }

What would be the output of above code? Choice a Choice b Choice c Choice d Learning\C\is\great\enjoyment. Learning C is great enjoyment. LearningCisgreatenjoyment. Learning C is great enjoyment.

Consider following code snippet: void main( ) { float x = 1, y = 1, z ; printf ( %d, z = ( x / y ) ) ; } What would be the output of above code? Choice a Choice b Choice c Choice d 0 1 1.000000 Garbage value

Consider following code snippet: void main( ) { int i = 2, j ; float f = 3.0 ; char ch = '*' ; //add statement here } Which of the following statement is to be added to get the output 254 if the ASCII value of * is 42?

Choice a Choice b Choice c Choice d

printf ( "%d", j = i + 2 * * ch ) ; printf ( "%d", j = i + 2 * f * ch ) ; printf ( "%d", j = 2 * f * ch ) ; printf ( "%d", j = i + 2 f * ch ) ;

Consider following code snippet: extern int i ;

Which of the following statement is correct about above code? Choice a Choice b Choice c Choice d It is a declaration. It is a definition. It is declaration as well as definition. It is neither declaration nor definition.

Which of the following code snippet will give output as 10? Choice a void main( ) { int i = 10 ; printf ( "%d", i ) ; }

Choice b void main( ) { printf ( "%d", 10 ) ; }

Choice c void main( ) { printf ( "%d", i = 10 ) ; }

Choice d

All of the above.

Consider following code snippet: void main( ) { int a, b, c, d ; printf ( %d, d = a + 2 b c ) ; } Which of the following statement is correct about the above code? Choice a Error: Lvalue required. Choice b Error: Rvalue required. Choice c Error: Function call missing. Choice d The code generates runtime exception.

Consider following code snippet:

void main( ) { int a = 5, b = 2, c ; a+b=c; printf ( %d, c ) ; }

Which of the following statement is correct about the above code? Choice a Choice b Choice c Choice d Error: Lvalue required Error: Rvalue required Error: Undeclared identifier c. The code runs successfully

Which of the following declaration is incorrect? Choice a Choice b Choice c float mes = 123.56 ; char con = T * A ; int this = T * 20 ;

Choice d

int a + 3 = b ;

No of times repeated

You might also like