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

C Language, a boon from Dennis Ritchie & Bell Labs online Test

void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
2..4
syntax error
compiler error
4..2
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
i=1
i=0
compiler error
syntax error
main() { int i=5; printf(“%d” , i=++i ==6); }
5
1
6
Compiler Error
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; } }
syntax error
compiler error
2 2 2 2 2 2 3 4 6 5
5 6 4 5 2 2 2 2
#include main() { struct xx { int x=3; Char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
syntax error
no output
Compiler Error
Hello
void main() { printf(“sizeof (void *) = %d \n”, sizeof(void*)); printf(“sizeof (int *) = %d \n”, sizeof(int*)); printf(“sizeof (double *) = %d \n”, sizeof(double*)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
no out put
Compiler Error
sizeof (void *) = 2 sizeof (int *) = 2 sizeof (double *) = 2 sizeof(struct unknown *) = 2
syntax error
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
H
syntax error
compiler error
E
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d", BLACK,BLUE,GREEN); }
no output
syntax error
0..1..2
compiler error
#include char *someFun1() { char temp[ ] = "string"; return temp; } char *someFun2() { char temp[ ] = {'s','t','r','i','n','g'}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
syntax error
some garbage value
Compiler Error
no out put
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
1
Compiler Error
syntax error
2
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
Compiler Error
syntax error
10
1
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
Compiler error: Cannot increment a void pointer
syntax error
memory address
no out put
Recursive functions are executed in a
Last in First out order
First in First out order
Are maintained in a stack
None of the above
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
Compiler Error
0
1
2
main() { int i = 3; for ( ; i++=0 ;) printf(“%d”,i); }
Compiler error: Lvalue required in function main
syntax error
some garbage value
no out put
Description:

This test is designed to help the students to assess their level of knowledge in C language
Disclaimer: Content, such as images used in the questions (if any), have been picked up from various places for the sole purpose of Instruction.

Comments
ghostkadost
By: ghostkadost
814 days 18 hours 5 minutes ago

No body uses 16 bit compiler anymore so please refrain from using FAR pointer and associating sizeof pointer as 2 bytes.

Nick
By: Nick
809 days 15 hours 44 minutes ago

It seems some answers are not correct....

chidambaram
By: chidambaram
768 days 19 hours 7 minutes ago

good for basic testing

singaravelan
By: singaravelan
722 days 1 hours 37 minutes ago

some of the answers are not correct...

deepak
By: deepak
720 days 14 hours 48 minutes ago

explanations must be there it will help in clearing our concept......deepak choudhary BE IT

krishna
By: krishna
713 days 19 hours 13 minutes ago

good questions to test..thanku

Pallavi
By: Pallavi
709 days 22 hours 3 minutes ago

its good

ism_9242
By: ism_9242
707 days 21 hours 40 minutes ago

it is good but when we are reviewing the answers explanations it is not comming.

ajay rajpoot
By: ajay rajpoot
702 days 18 hours 59 minutes ago

its really good

Anjana
By: Anjana
697 days 16 hours 29 minutes ago

hi..It will be better if u explain the right answers

jayagobinathan
By: jayagobinathan
696 days 23 hours 46 minutes ago

It's good to improve the skills

kalarani
By: kalarani
676 days 18 hours 32 minutes ago

it seems like considerable amount of answers r wrong..

Bill
By: Bill
670 days 18 hours 23 minutes ago

Sucks.... Please next time try to compile your code first. Also define some information of environment, such as data types size.

mohammed
By: mohammed
651 days 6 hours 48 minutes ago

question 2 is wrong answered and the right answer is i = 0
and question 8 is wrong answered and it's answer would be a compilation error, and finally question 14 is wrong answered or it's not clear. other than that it's a good exam.

mohammed
By: aadhib
384 days 23 hours 31 minutes ago

no q2 is correct..i try that one

vignesh
By: vignesh
640 days 14 hours 17 minutes ago

answer explanation is not coming properly..
good test

Veeksha .A.V
By: Veeksha .A.V
600 days 14 hours 25 minutes ago

the explanation for the answers is not there .please send the explanation.

baskaran
By: baskaran
583 days 22 hours 5 minutes ago

it s very useful to me

DN
By: DN
580 days 11 hours 29 minutes ago

For Q6 the struct unknown is not declared so you can have either error or valid printf..

sajid
By: sajid
579 days 17 hours 12 minutes ago

Where we can find the explanations..its boring without that

@nyl kr
By: @nyl kr
562 days 17 hours 48 minutes ago

In fact i found this test worthy even after some problems!!!!.

vinod
By: vinod
560 days 13 hours 2 minutes ago

you are repeating the same questions

vinod
By: vinod
558 days 14 hours 13 minutes ago

not yet satisfied

para srish
By: para srish
553 days 21 hours 48 minutes ago

i want the explanation for 6,7,9,10,11,14..as i dint find it ok!!

para srish
By: para srish
553 days 21 hours 43 minutes ago

i found that this test is worth while appearing and its question content is good enough!!

laxmimanu0007
By: laxmimanu0007
547 days 20 hours 52 minutes ago

to learn how to start

kirthika
By: kirthika
546 days 18 hours 13 minutes ago

can u pls teel hoe this ans comes

jagadeesh
By: jagadeesh
546 days 9 hours 51 minutes ago

not mentioned which compiler it is...

raja
By: raja
508 days 18 hours 41 minutes ago

anyway i enjoyed it....thanks

vicky
By: vicky
506 days 10 hours 48 minutes ago

Kindly check the first question. I think the answer should be syntax error...

siva
By: siva
424 days 17 hours 46 minutes ago

good 2 improve our knowledge

ravi Kumar
By: ravi Kumar
395 days 10 hours 3 minutes ago

any body can tell me hows int i=5 printf("%d",i= i==6);
output is 1 ? plz help.

ravi Kumar
By: sami
395 days 7 hours 41 minutes ago

do you mean (i= i==6)..

(i= i == 6) will be evaluated as (i=6) == 6).. here i=6 is assignemt
operation so result will be the value assigned i.e. 6 so its same as
(6==6) which is a comparision operation. since 6==6 its true i.e. 1 it prints "1".

ravi Kumar
By: sami
395 days 7 hours 39 minutes ago

sorry increment operator is not getting printed in html.. read the
expression as (i=i plus plus == 6).

murugan
By: murugan
221 days 14 hours 45 minutes ago

efficient and useful for interview person

murugan
By: murugan
221 days 14 hours 45 minutes ago

efficient and useful for interview person

sugan s
By: sugan s
218 days 16 hours 31 minutes ago

please we need explanations for clarify the doubts

ankita leela
By: ankita leela
149 days 15 hours 36 minutes ago

its very useful for us, thank u.But explanation is also required

praveen
By: praveen
142 days 10 hours 34 minutes ago

thanks a lot............

vikas
By: vikas
135 days 12 hours 50 minutes ago

the worst test i have ever faced..some answers of the questions is not given in a option..reallly dumbooo...

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

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 227 Attempts

ASP.NET, Namespaces ASP.NET
10 Questions | 856 Attempts

An ASP.NET Application
10 Questions | 173 Attempts

Test your basic knowledge on DATASTRUCTURES, STACK
10 Questions | 410 Attempts