C Language Quiz 2012

Posted by Stephen thangaraj at 18:28

Quiz 2012 C Quiz


#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

int i=5;

clrscr();

printf("\t%d\t %d \t %d\t%d",++i,i,i--,i);

getch();

}



void main()

{

char c='0';

printf("%d %d",sizeof(char),sizeof(c));

}



void main()

{

printf("\the \backwater \is very \famous");

}

void main()

{

int *p,b[3]={10,20,30};

p=b;

clrscr();

printf("\n%d %d",sizeof(p),sizeof(*p));

printf("\n%d",b[0]);

printf("\n%d %d %d",*p,*(p++),++(*p));

getch();

}



void main()

{
printf("main:");

if(main)

{

printf("display");

}

main();

}



void main()

{

char s1='1';

clrscr();

if(1==s1)

printf("both are Same()");

}



void main()

{

clrscr();

if(printf("hello")=="hello")

printf("If condition is checked");

}



void main()

{

int a=64;

clrscr();

a=a>>3>>1;

printf("%d",a);

getch();

}



void main()

{

int dec,j,c,bit[16];

clrscr();

// printf("Decimal:");

// scanf("%d",&dec);

dec=256;

for(c=0;dec>=1;c++)

{

bit[c]=dec%2;

dec=dec/2;

}

c=c-1;

for(;c>=0;--c)

printf("%d ",bit[c]);

getch();

}



void main()

{

int square(int);

int binary=111;

char binary1;

int count,i,sum=0,t=0;

clrscr();

strcpy(binary1,binary);

count=strlen(binary1);

for(i=count-1;i>=0;i--)

{

t=binary/2;

printf(" %d",t);

if(t)

sum+=square(count);
}

printf("Decimal value %d",sum);

getch();

}

int square(int c)

{

int s=0;

for(;c>=1;--c)

{

s+=2*2;

}

return(s);

}




void main()

{

long double far *s1,*s2,*s3,*s4;

clrscr();

printf("%d %d %d",sizeof(s1),sizeof(s2),sizeof(s3),sizeof(s3));

}




void main()

{

int x=40;

{

int x=20;

printf("\n %d",x);

}

printf("%d",x);

}



void main()

{

extern int i;

i=20;

printf("%d",sizeof(i));

}





extern int fun(int);

void main()

{

 int a ;

a=fun(3);

printf("%d",a);

}

int fun(aa)

int aa;

{

return(aa);

}




f(struct emp);

struct emp

{

char name[20];

int age;

};

main()

{

struct emp e={"ste",13};

f(e);

}

f(struct emp ee)

{

printf("\n %s %d",ee.name,ee.age);

}



void fun()

{

there:

printf("ddsdf");

}

void main()

{

int i=1;

while(i<=5)

if(i<=5)

goto there;

}



void main()

{

int i=2;

switch(i)

{}

}



void main()

{

int i=1;

switch(i)

{

printf("hello");

case 1:

printf("Stev");

break;

case 2:

printf("Dong lee");

break;

}

}


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

12 comments:

digi mark on 4 September 2018 at 06:08 said...


Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing.

rpa online training

automation anywhere training in chennai

automation anywhere training in bangalore

automation anywhere training in pune

automation anywhere online training

blueprism online training

rpa Training in sholinganallur

rpa Training in annanagar

blueprism-training-in-pune

automation-anywhere-training-in-pune


shalinipriya on 13 September 2018 at 07:11 said...

I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
Data Science training in marathahalli
Data Science training in btm
Data Science training in rajaji nagar
Data Science training in chennai
Data Science training in electronic city
Data Science training in USA
Data science training in pune
Data science training in kalyan nagar


sudhagar raja on 15 September 2018 at 00:33 said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
java training in chennai | java training in bangalore

java online training | java training in pune


shri yadav on 18 September 2018 at 22:52 said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
python training in annanagar
python training in chennai
python training in chennai
python training in Bangalore


gkr ragini on 20 September 2018 at 22:22 said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.

Devops training in sholinganallur


param jothi on 2 October 2018 at 23:29 said...

Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
Blueprism training in Pune

Blueprism training in Chennai


sathya shri on 5 October 2018 at 06:17 said...

I found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article.

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli


ram ramky on 21 November 2018 at 21:41 said...

Inspiring article, all your points are worth to learn. Cheers and thanks for the clear path.


Selenium Training in Chennai
software testing selenium training
ios developer course in chennai
Digital Marketing Course in Chennai
dot net course
dot net coaching centers in chennai
c# training in chennai 
Big Data Training in Chennai


suresh on 21 February 2019 at 10:09 said...

Excellent Article. Thanks Admin
DevOps Training in Chennai

Cloud Computing Training in Chennai

IT Software Training in Chennai


Sadhana Rathore on 8 March 2019 at 02:43 said...

I am very happy to visit your blog. This is definitely helpful to me, eagerly waiting for more updates.
Automation Anywhere Training in Chennai
Automation Training in Chennai
Automation courses in Chennai
RPA Training in Chennai
Robotics Process Automation Training in Chennai
Blue Prism Training in Chennai
Blue Prism Training Chennai
RPA Training in Chennai


raybon on 9 March 2019 at 01:33 said...

I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.

devops online training

aws online training

data science with python online training

data science online training

rpa online training


rose on 9 March 2019 at 02:18 said...

You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us
Microsoft Azure online training
Selenium online training
Java online training
Python online training
uipath online training


Have any question? Feel Free To Post Below:

 

© 2011. All Rights Reserved | Interview Questions | Template by Blogger Widgets

Home | About | Top