Depth of C Online Test

What is the size of data type long int in Solaris operating system ?


main()

{

f();

f();

f();

}

f()

{

auto int a=1;

a++;

printf("%d",a);

}


main()

{

f();

f();

f();

getch();

}

f()

{

static int a;

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

}


Suppose there is two file A.C and B.C

If variable int a is decleared in A.C file as global variable and if wanna use that variable in B.C file then which keyword we have to add before int a .Means what would be the value of ? in following statement.

? int a;


Following statement is true or wrong ?

short a,b,c;

c=a+b;


Following statement is true or wrong for declearing variable a?

long a;

register a;

unsigned a;

short a;


what would be the value of a?

main()

{

const int a=5;

int * const ptr=&a;

*ptr=20;

printf("%d",a);

}


will the following code give error ?

int a;

flaot *ptr=&a;


what would be the output of folloing code?

main()

{

printf("%x"+1,255);

}


what would be the output ?

main()

{

printf(" \\\65 "):

}


what would be the output of code?

main()

{

printf("%s","target"+printf("hi"));

}


what wii be the output of code?

main()

{

scanf("%1d%2d%2d",&a,&b,&c);

// suppose user enter valoe a=12345,b=55,c=560;

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

}


what will be the op?

main()

{

int a=4,b=4,c=9;

if(a>b)

if(a==b)

printf("both are same");

else

printf("how do u feel");

}







































































































Description:

This is test for enhancing programming logic for enthusiastic C programmer

Discussion

bekkam srinivas

saale sab questions k ans wrong hai!!!!!.. khudko kuch aata hai ke nahi dekh pehle...

4103 days 18 hours 55 minutes ago

bekkam srinivas

saale sab questions k ans wrong hai!!!!!.. khudko kuch aata hai ke nahi dekh pehle...

4103 days 18 hours 55 minutes ago

praveen

good work but...
check Q5,Q7

4197 days 8 hours 23 minutes ago

nehajain

printf("\\\\65");
hw it will give 5

4222 days 19 hours 17 minutes ago

nehajain

printf("\\\\65");
hw it will give 5

4222 days 19 hours 17 minutes ago

sumesh prabhune

Ur Q 7 will also give an error as the stmt p =

4248 days 12 hours 56 minutes ago

sumesh prabhune

Your question 5 is wrong...how can it possibly give an error??

4248 days 23 hours 44 minutes ago

Lahuraj

Hi Anurag............

test was really good........

4256 days 20 hours 26 minutes ago

Anurag Sharma

Hi guys n gals.I've created new test C.Take a look around it !

4272 days 7 hours 39 minutes ago

Anurag Sharma

hello Miss Neha.How do u find ma test ? My test have dazzled u Am i right ?

4272 days 9 hours 4 minutes ago

Anurag Sharma
student
User
7 Followers
Tests: 2

Your Facebook Friends on WizIQ

More Tests By Author

Play with C
13 Questions | 94 Attempts