0% found this document useful (0 votes)
36 views1 page

Zoho 9

The document contains 15 code snippets that demonstrate various C programming concepts like data types, operators, input/output, and conditional statements. Each snippet prints output to demonstrate the concept.

Uploaded by

Sundheep S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views1 page

Zoho 9

The document contains 15 code snippets that demonstrate various C programming concepts like data types, operators, input/output, and conditional statements. Each snippet prints output to demonstrate the concept.

Uploaded by

Sundheep S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PART # A return 0;

1.int main() {
printf("%d%d%d%d\n",72,072,0x72,0X72); 10.int main() {
return 0; printf("%d\n",sizeof(4)/sizeof(2.0));
1 printf("%d\n",sizeof(2.0)/sizeof(4)); return 0;}
2.int main(){ 11.int main() {
printf("%d%.)3&„. 2,;2,72); intp,q;
return 0; printf("Enter values of p and q\n");
scanf("%d%d",p,q);
3.int main(){ printf("p=%d q=%d\n",p,q);
charch;inta;float b; return 0;
printf("bytes occupied by ch=%d\n",sizeof(ch));
printf("bytes occupied by a=%d\n",sizeof(a)); PART # B
printf("bytes occupied by b=%d\n",sizeof(b)); 12.int main() {
return 0; int x=10,y=5,p,q;
p=x >9;
4.int main() { q=x>3&& y!=3;
printf("%d\n",sizeof(cnar)); printf("p=%d q=%d \n",p,q);
printf("%d\n",sizeof(int)); return 0;
printf("%d\n",sizeof(float));
return 0; 13.int main(){
int a=30,b=40,x;
5.int main() ( x=(a1=10)&8(1)=50);
printf("%d\n",sizeoff'7')); printf("x=%d\n",x);
printf("%d\n",sizeof(7)i. return 0;
printf("%d\n",sizeof(7.0)); }
return 0; } 14.int main() {

6.int main() { int x=0,y=1;


charch=291; printf("%d%d%c\
n",2147483648,ch,ch); return 0; y=k; x=!y; printf("x=%d y=
}
%d\n",x,y);
7_int main() {
float a=5,b=2;int c; return 0;

p rintf("%d\n",c);
return 0; 15.int main() {

int main() { int x=3,y=4,z=4; printf("ans=%d\n",


int g=300000*300000/300000;
p ri ntf("g=%d\n",g); (z>=y>=x?100:200)); return.0;
return 0;
}
9.. int main() {
float a;
a ---=4/2;
pri ntf("%f%f\n",a,4/2);

You might also like