WizIQ helps you learn and teach online - any subject you can think of!
Join for FREE

TEST IN C

Que: what is output of followin code? main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
1)I love U
2)I hate u
3)compiler error
4)none of the above
Que 2: main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
2 2 2 2 2 2 3 4 6 5
3 3 3 3 5 4 5 6 8 3
compiler error
none of the above
que 3): main() { extern int i; i=20; printf("%d",i); }
1)20
2)Undefined symbol '_i'
2)compiler error
4)none of the above
Que 4) main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
1)no output
2)0 0 1 3 1
3)compiler error
4)none of the above
Que 5) main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
1)one
2)two
3)three
4)zero
Description:

this is simple test in c u have to only give the answer in option format. if u want explation give reply for me.

Tags:

test c

Comments
nipur
By: nipur
845 days 13 hours 5 minutes ago

Heee I feel Q2 is not complete ... is it so?? plz. help me out..

Rajeev
By: Rajeev
817 days 16 hours 41 minutes ago

yes its not completed !!! Copy+Paste error

mpasinski
By: mpasinski
806 days 13 hours 33 minutes ago

I think that question 3 is also not correct. Supposing that value i is declared in any other file, this program will print 20 (so answer 1 is correct).

mpasinski
By: rakesh
380 days 15 hours 2 minutes ago

3rd is complete

priscilla
By: priscilla
801 days 12 hours 50 minutes ago

hello sir can u explain me the 2nd ques

yogs
By: yogs
687 days 6 hours 9 minutes ago

yaaaaaar so tff

anju joshi
By: anju joshi
646 days 12 hours 37 minutes ago

Q2 is incumplte....

AruN
By: AruN
617 days 11 hours 13 minutes ago

Q2 is Incomplete. . .other than its so easy . . .

venky
By: venky
596 days 20 hours 39 minutes ago

how to solve 2nd qstn

pallavi
By: pallavi
593 days 22 hours 6 minutes ago

Q 2: will give output as compiler error as for loop is not getting completed..

pallavi
By: raja
582 days 22 hours 59 minutes ago

yes its wrong i think also..because the ques is in complete

venugopal
By: venugopal
592 days 10 hours 26 minutes ago

Hey questions in 2, 3 ,4 incomplete not effective answers in 2 is incomplete 3 thers not _i nteger like that 4 for post increment value cant be changed.

deepak
By: deepak
565 days 9 hours 3 minutes ago

i cleared all

muralikrishna
By: muralikrishna
555 days 18 hours 7 minutes ago

plz post 2nd question clearly

neeraj
By: neeraj
526 days 16 hours 45 minutes ago

after q5 there is no next option

ravi kumar chaudhary
By: ravi kumar chaudhary
516 days 3 hours 34 minutes ago

u have forget to write complete code....update it

rajeev singh
By: rajeev singh
513 days 5 hours 36 minutes ago

very intersting ,but no of que should be increase.

shobana
By: shobana
499 days 13 hours 43 minutes ago

these r very easy

S.Anand Kumar
By: S.Anand Kumar
484 days 19 hours 22 minutes ago

correct ur mistake of question 2

Bibin
By: Bibin
483 days 13 hours 12 minutes ago

Not so tuff for me anyway thx........

pavithra mantrawadi
By: pavithra mantrawadi
453 days 11 hours 24 minutes ago

i cant understud 2 nd question

laxmi
By: laxmi
412 days 8 hours 51 minutes ago

hi.. i think question 2 is incomplete .. if i'm wrong pl explain me .

aadhib
By: aadhib
382 days 19 hours 37 minutes ago

this is corect,....i checked this

anil kapoor
By: anil kapoor
377 days 9 hours 15 minutes ago

i think q2 is incoplete

dheeraj
By: dheeraj
372 days 5 hours 38 minutes ago

where is _ in question 3

dheeraj
By: dheeraj
372 days 5 hours 38 minutes ago

where is _ in question 3

ashutosh
By: ashutosh
353 days 22 hours 26 minutes ago

Hi,
I guess question 3 if you have defined i variable externally we can change its value, in another file. right ?
?

ashutosh
By: mohanapriya c
210 days 15 hours 50 minutes ago

ya absolutely....:)

pinki
By: pinki
352 days 8 hours 26 minutes ago

I think the test questions are incomplete and also your test generates worng results..

suraj bhan
By: suraj bhan
340 days 7 hours 48 minutes ago

it's too simple plz make it complex

vikas
By: vikas
259 days 15 hours 15 minutes ago

plz complt Q2.

Radha
By: Radha
235 days 13 hours 12 minutes ago

2nd question not given full qstn.Some qstn has missed

mohanapriya c
By: mohanapriya c
210 days 15 hours 52 minutes ago

hi... i cant see the 2nd question..

mohanapriya c
By: mohanapriya c
210 days 15 hours 52 minutes ago

hi... i cant see the 2nd question..

nivethitha
By: nivethitha
198 days 10 hours 47 minutes ago

explain tis qs

sailendar bongani
By: sailendar bongani
154 days 11 minutes ago

Q2 IS INCOMPLETE

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no.:


Area code Number
Subject you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
Ramkrushna Shelke
Software Developer(Max Secure AntiVirus Pvt. Ltd.)
User
31 Followers

Your Facebook Friends on WizIQ

More Tests By Author

Multiple choice questions in C
20 Questions | 35 Attempts

Free C++ Test
20 Questions | 2074 Attempts