Play with C online Test

int main()

{

unsigned i=1;

signed j=-1;

if(i<j)

printf("true");

else

printf("false");

return 0;

}


#include<stdio.h>

int main()

{

printf , ("%d",123);

return 0;

}


int main()

{

float a;

printf("%d",sizeof(a+sizeof(a));

return 0;

}


int main()

{

"hello"+printf("hello");

return 0;

}


int main()

{

printf("hello"+"guest");

return 0;

}


int main()

{

printf("customer"+printf("hello"));

return 0;

}


int main()

{

int a,b;

scanf("%d%denter value of a and b",&a,&b);

printf("%d%d",a,b);

return 0;

}


int main()

{

int a,b;

scanf("entervalue of a and b%d%d",&a,&b);

printf("a=%d b=%d",a,b);

return 0;

}


int main()

{

char ch=1;

while(ch<=255)

{

printf("%d",ch);

ch++;

}

return 0;

}


int main()

{

int i=1;

for( ; i<10 ; printf("%d",i));

i++;

return 0;

}


int main()

{

int i;

for(i=1;i<=2;i++) {

switch(i) {

case 1:

printf("case 1");

continue;

printf("case 1 again");

break;

case 2:

printf("case 2);

break;

}

}

}


int main()

{

const void * vp;

int * ip;

int * const p=ip;

vp =ip; // ist line

ip=vp; // 2nd line

ip=(void *)vp; //3rd line

*(const int **)&ip=vp; // 4 th line

return 0;

}

which line will give error ?


Suppose someone makes a program and save file by name of " test .c" After this what would be the next extension of file before making .exe file ?






































































































Description:

Have a fun with it !

Comments
jugalmehta2012
By: jugalmehta2012
1013 days 11 hours 58 minutes ago

ans of 5 th que is wrong

Anurag Sharma
By: Anurag Sharma
1012 days 19 hours 56 minutes ago

Ans of 5th question is absolutely right.Both of words "hello" and "guest" is written in double quote so they refer to address and two address can't be added. ! run by uself

Anurag Sharma
By: jugalmehta2012
1005 days 9 hours 37 minutes ago

hello anurag,
sorry for late reply........
but u r wrong.....
ew can't use plus sign like this u can use only coma......
plz u ll check this on ur pc.......

Anurag Sharma
By: jugalmehta2012
1005 days 9 hours 34 minutes ago

hey sorry........
i had some missunderstanding.....
there is a error in that que.......
ok

Anurag Sharma
By: Anurag Sharma
1005 days 8 hours 48 minutes ago

Quest 5 will give compile time error bcz of invalid pointer addition.So ans is option third-"error".that is correct ans option.......vat r u trying to say ? in previous message i already have cleared the reason that y quest 5 will give compile time error........

lakshmi manasa
By: lakshmi manasa
1000 days 7 hours 46 minutes ago

nice but bit difficult for me

Lahuraj
By: Lahuraj
999 days 8 hours 9 minutes ago

Hi Anurag....
Can u check answers of question no 2 and 10.

Lahuraj
By: Anurag Sharma
998 days 20 hours 27 minutes ago

hi laksmi..u attempted test very nice 9 out of 13 is good score.Ya u r right test is a bit difficult.Ma motto of test is to give a variety of question who try to attempt ma test.u haven't got ma question from any c book.Actually i make ma own question by reading lot of books of C.I'm also student n too trying go more in depth of C language.C is sea.U just enjoy ma test .I'll steer the dazzling test for C maniac..........have a fun !!!!!!!!

Lahuraj
By: Anurag Sharma
998 days 20 hours 18 minutes ago

In quest-> 5 , i had written 1,2,3 but wiziq server couldn't add comma between 1 and 2 and 3 at the time of creating test.....I think it is common error of server of type Code -500.quwst ->10 is right

jugalmehta2012
By: jugalmehta2012
990 days 10 hours 53 minutes ago

void main()
{
printf("customer" "hello");
}

give me detailed reason of this que.....
becoz we decrease the length of outer statement than the output is hellohello,,than every time one character remove from this ans as outer string is decrease....i know that printf return int...
so plz reply as soon as possible..........

anita tomar
By: anita tomar
984 days 5 hours 14 minutes ago

plz anurag give me the explanation of the ans no 6

pankaj sewalia
By: pankaj sewalia
894 days 9 hours 28 minutes ago

hey que2 my compiler show output 123

pankaj sewalia
By: pankaj sewalia
894 days 9 hours 28 minutes ago

hey que2 my compiler show output 123

Want to learn?

Sign up and browse through relevant courses.

or fill this simple form
Name:
Your Email:
Password:
Country:
Contact no.:


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


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
Anurag Sharma
student
User
7 Followers
Tests: 2

Your Facebook Friends on WizIQ

More Tests By Author

Depth of C
13 Questions | 202 Attempts

Connect