C MCQ's

Share Embed Donate


Short Description

Objective type questions with answers...

Description

C- Objectives Object ives ( Unit -1)SET-1 -1)SET-1 1. Which of the following is not a valid variable name declaration? a) int _a3; b) int a_3 a_3;; d) int _3a c) int 3_a; 2. All keywords in  are in a) LowerCase letters b) !""erase letters

c) CamelCase letters

3. Which of the following is not a valid  variable name? a) int n#mber; b) float rate; c) int variable_count;

d) None

d) int $main;

$. %he format identifier format identifier &'i( is also #sed for _____ data ty"e? a) char c) float d) double b) int . What is the si*e of an int data ty"e? a) $ +ytes b) , +ytes c) Depends on the system/compiler  -. Which of the following is not a valid variable name declaration? a) float / 0 3.1$; b) do#ble / 0 3.1$ ; c) int PI = 3.!;

d) annot be determined

d) define / 3.1$

. Which is correct with res"ect to si*e of the dataty"es? a) char  int  float b) int  char  float c) char " int " do#ble

d) do#ble  char  int

,. Which keyword is #sed to "revent any changes in the variable within a  "rogram? a) imm#table b) m#table d) volatile c) const 4. A variable declared in a function can be used in main d) None of the mentioned a) %r#e b) alse c) %r#e if it is declared static 15. Which esca"e character can character  can be #sed to bee" from s"eaker in ?

B) \b C) \m 11. Explicit tpe conversion is !no"n as .................... .................... B) conversion C) dis#unction A) casting %) &a

D) \n D) separation

12. If a is an integer variable, a=7/3; will return a value A) 2.5 B) 3 C) 0 D) 2 13. ierar!"#$%&erat'r (re!een!e) e!ies w"i!" '&erat'r

$) is *'st i*&'rtant B) is used first C) is fastest +) %&erates 'n largest nu*bers 1. -"i!" 'f t"e f'll'wing is t"e !'rre!t 'rer 'f evaluati'n f'r t"e bel'w e&ressi'n =#/241 A. * / % + - =

B. =  /   4

C. /   4  =

+.   / 4  =

15. In w"i!" 'rer ' t"e f'll'wing gets evaluate 1.elati'nal 1.elati'nal A. 2134

2.Arit"*eti! 2.Arit"*eti! B.123

3.6'gi!al

C.321

. Assign*ent Assign*ent +.321

C- Objectives (SET-2) 1. %hich of the follo"in& cannot be chec!ed in a s"itch'case statement( $. Character

C.

B.nte&er

Float  

D.

enum

2. Ientif# t"e un!'niti'nal stru!ture  1)'4w"ile 2)8wit!" 3)/dentify the wrong statement 6 1) if7ab);

') i( a  b ;

3)goto  c) if 7ab) 8 ;9

)If  d)none

$)%he minim#m n#mber of times d5:while loo" eec#ted is 6 1)5

') 

3)2

$) can not be "redicted

) What is the val#e of  in the e"ression  0 7a015 < a=a) 1)invalid

2) 5

!)**

3)15

-)%he &>( o"erator dis"lays 6

a)%ddress o( +ariable

b)val#e of variable c)a and b both

d)none

)what f#nction is a""ro"riate for acce"ting a string

a),ets-)

b)getch7)

c)getche7)

d)scanf7)

,)Which is the correct statement for finding c#be of 2.

a)pow-'3)

b)"ow73
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF