What is the value of the following integer literal?
017
Select correct answer (single choice) 17 23 the literal is invalid 15
What is the value of the following integer literal?
0x17
Select correct answer (single choice) the literal is invalid 23 17 15
Which of the following strings is a valid variable nae? Select correct answer (single choice) anti!world none of these anti"world
anti#world
Which of the following declarations is valid? Select correct answer (single choice) $oat $oating% $oat $oat% $oat long% $oat int%
What is the value of the & variable at the end of the following sni''et? int & % & & " & * 2% & & + & * ,% & & - 2 + &%
Select correct answer (single choice) 10 1, 1. 12
What is the value of the & variable at the end of the following sni''et? $oat & 2/0% & & - & + ,% & & * & + &% & & * & - &%
Select correct answer (single choice) 11/000000 1/000000 0/500000 110/000000
Which of the following strings is a 'ro'er $oating"'oint nuber (in the language sense)? Select correct answer (single choice) 30x10 34 300000000 3/0x10
What is the value of the variable at the end of the following sni''et?
int & 1% int 6 & - 2%
6--% int 6%
""&%
6""% & * 6 + & + 6%
Select correct answer (single choice)
3 7 0 1
What is the value of the & variable at the end of the following sni''et? int &%
& (r " s) + (8 * )%
Select correct answer (single choice) 1 2 the sni''et is invalid and will cause co'ilation error 0
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int x 1 9 1% $oat > "1e0 2e1% 'rintf(d@n (x < 9) - (x < 9) - (> < 9) - ( < >) - (A ; B))% return 0% C
Select correct answer (single choice)
the 'rogra out'uts 2 the 'rogra out'uts 3 the 'rogra out'uts , the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i 1% if(i 0) i 2%
else i 3%
'rintf(d@ni)% return 0% C
Select correct answer (single choice) the 'rogra out'uts , the 'rogra out'uts 3 the 'rogra out'uts 1 the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) =
int i 1 D 0% do = i + 2% D - i * 2% C while(D ; 1)% 'rintf(di - D)% return 0% C
Select correct answer (single choice) the 'rogra enters an inEnite loo' and out'uts nothing the 'rogra out'uts 2 the 'rogra out'uts 3 the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i 5 D 1.% while(D < 0) = i * 2% D " i * 2% C 'rintf(di - D)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 3 the 'rogra out'uts 1 the 'rogra out'uts 2 the 'rogra enters an inEnite loo' and out'uts nothing
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i 1 D% for(D 0% D % D"") i + 2% 'rintf(di - D)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts 3 the 'rogra enters an inEnite loo' and out'uts nothing
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) =
int i "1 D 1% for(i--% i--% i--) D--% 'rintf(di - D)% return 0% C
Select correct answer (single choice) the 'rogra enters an inEnite loo' and out'uts nothing the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts 3
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i 1 D 0 >% > (i << D) - (D << i) - (i << i) - (D << D)% > ;; i% 'rintf(d >)% return 0% C
Select correct answer (single choice) the 'rogra out'uts , the 'rogra out'uts 1
the 'rogra out'uts 0 the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i 3 D i " 2 + i% switch(i " D) = case 1# D--% case 2# D""% case 0# D--% brea>% default# D 0% C 'rintf(d --D)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 1 the 'rogra out'uts , the 'rogra out'uts 2 the 'rogra out'uts 0
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) =
int i 5 D i " , + i% switch(D) = default# D 2% case 1# D""% brea>% case 2# D--% case 0# D""% brea>% C 'rintf(d D--)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 1 the 'rogra out'uts , the 'rogra out'uts 2 the 'rogra out'uts 0
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i tF,G% for(i 0% i ; 3% i--) = tFiG , " i% tFi - 1G 2 + tFiG% C 'rintf(d@n tF2G)%
return 0% C
Select correct answer (single choice) the 'rogra out'uts , the 'rogra out'uts 1 the 'rogra out'uts 2 the 'rogra out'uts 0
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = int i s 0 tFG =1. , 2 1 0C% for(i 5% tFiG < 2% i * 2) s - tFiG% 'rintf(d@n s)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts , the 'rogra out'uts 0 the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra?
:include ;stdio/h< int ain(void) = char tFG = x B 6 2 0C% 'rintf(d@n tFtF1G " tF0G " tF3G - tF2G - 3G " tF5G)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 0 the 'rogra out'uts 2 the 'rogra out'uts , the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = $oat a 3/1,40 +b Ha ++c Hb% ++c a - (a +b)% 'rintf(f a)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2/1,0000 the 'rogra out'uts ,/1,0000 the 'rogra out'uts IJKK
the 'rogra out'uts 3/1,0000
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = char tF,GF,G% 'rintf(d@nsiBeof(t) * siBeof(tF0G) * siBeof(tF0GF0G))% return 0% C
Select correct answer (single choice) the 'rogra out'uts , the 'rogra out'uts 1 the 'rogra out'uts the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = char +' @0@2@1@3@,% 'rintf(d@n 'F'F2GG - +(' - 1) - 'F0G)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2
the 'rogra out'uts the 'rogra out'uts 1 the 'rogra out'uts ,
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :include ;string/h< int ain(void) = char ttF20G L0172.35,% strc'9(tt tt - 3)% 'rintf(d@n strlen(tt) " ttFLG - 5)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts , the 'rogra out'uts
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :include ;string/h< int ain(void) = char ttF20G 0123,5.7L% strcat(tt - 11 123)%
'rintf(d@n strlen(tt) " ttFG - 0)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 1 the 'rogra out'uts , the 'rogra out'uts the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :include ;stdlib/h< int ain(void) = $oat +t 1 - ($oat +) alloc(siBeof($oat) + siBeof($oat))%
t""% +t /0% tF1G +t * ,/0%
t--% tF"1G +t * 2/0%
'rintf(f@n+t)%
free(""t)% return 0% C
Select correct answer (single choice)
the 'rogra out'uts ,/000000 the 'rogra out'uts /000000 the 'rogra out'uts 2/000000 the 'rogra out'uts 1/000000
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :include ;string/h< struct S = char SFG% C% int ain(void) = struct S S = a b c d C% 'rintf(d siBeof(S/S) " strlen(S/S) - S/SF,G)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts the 'rogra out'uts ,
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h<
:include ;string/h< :include ;stdlib/h< struct S = char +S% C%
int ain(void) = struct S +S (struct S +) alloc(siBeof(struct S))% S "< S 123@0,5.7% 'rintf(d strlen(S "< S - 5) - S "< SF3G)% free(S)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts , the 'rogra out'uts
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< struct S = int Mar% struct S +Str% C%
int ain(void) = struct S SFG = = IJKK C = , HSF0G C = 2 HSF1G C C% 'rintf(d SF2G/Str"
Select correct answer (single choice) the 'rogra out'uts the 'rogra out'uts , the 'rogra out'uts 1 the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int fun(int +t) = return +(t - 3)% C int ain(void) = int arrFG = 3 2 1 0 C% 'rintf(d@n fun(arr " 2))% return 0% C
Select correct answer (single choice) the 'rogra out'uts 1 the 'rogra out'uts ,
the 'rogra out'uts the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< $oat f($oat v) = v v * 2/0% return v - v% C int ain(void) = $oat x ,% f(x)% 'rintf(fx)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2/000000 the 'rogra out'uts /000000 the 'rogra out'uts ,/000000 the 'rogra out'uts 1/000000
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< char +f(char +') = return ' - 2%
C char +g(char +') = return ""'% C int ain(void) = char +s 8NO4PQRT% char ' +f(g(f(s - 1)))% 'rintf(d' " 8)% return 0% C
Select correct answer (single choice) the 'rogra out'uts , the 'rogra out'uts 2 the 'rogra out'uts 1 the 'rogra out'uts
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< struct S = int SF3G% C% void f(struct S S) = S/SF0G S/SF1G - S/SF2G " ,% C int ain(void) =
struct S S = = 1 , 2 C C%
f(S)% 'rintf(dS/SF1G + S/SF0G)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 1 the 'rogra out'uts 2 the 'rogra out'uts , the 'rogra out'uts
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< struct S = int SF3G% C% void f(struct S +S) = S"
f(U)% 'rintf(dS/SF2G * S/SF0G)% return 0% C
Select correct answer (single choice) the 'rogra out'uts the 'rogra out'uts 2 the 'rogra out'uts , the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :include ;string/h< char +f(int ' char +s) = sF' - 2G @0% return s " 1% C int ain(void) = char sFG 8NO4P% int i strlen(f(1s - 2))%
'rintf(d@ni)% return 0% C
Select correct answer (single choice) the 'rogra out'uts the 'rogra out'uts , the 'rogra out'uts 1 the 'rogra out'uts 2
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< int ain(void) = char sF20G ?% PK4 +f fo'en(fo'enw)% int i f'uts(7Lf)% fclose(f)% f fo'en(fo'enr)% fgets(s - 13f)% 'rintf(c@n sF2G " sF3G)% fclose(f)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 2 the 'rogra out'uts , the 'rogra out'uts the 'rogra out'uts 1
What ha''ens if 9ou tr9 to co'ile and run this 'rogra? :include ;stdio/h< :deEne VI4 :deEne WV int ain(void) =
1 VI4 - VI4
int i 2% i i " 2 + WV% 'rintf(d@n i)% return 0% C
Select correct answer (single choice) the 'rogra out'uts 0 the 'rogra out'uts , the 'rogra out'uts 2 the 'rogra out'uts 1
What is the eaning of the following declaration? $oat +f(int)%
hoose the right answers# Select correct answer (single choice) the declaration is erronous f is a 'ointer to function (int) returning $oat% f is a 'ointer to function ($oat) returning int% f is a function (int) returning 'ointer to $oat%
Select the 'ro'er for for the following declaration# 'tr is a 'ointer to 'ointer to 'ointer to double hoose the right answers# Select correct answer (single choice)
double ++'tr% double +'tr% the declaration is invalid and cannot be coded in double