Set-1 PC Fundamentals Home Assignment
Set-1 PC Fundamentals Home Assignment
PROGRAMMING IN C
(Fundamentals, Operators & Expressions)
(FACE)16 = ( ? )2 = ( ? )8
(764)8 = ( ? )2 = ( ? )16
{
int a=3, b= -4;
printf ("%d", a%b+a*b%a);
return 0;
}
1.15 What will be output of the following c
program?
#include<stdio.h>
int main()
{
int a=3, b= -4;
printf ("%d", a*b-a%b/a);
return 0;
}
1.16 Write the output of the following code
void main( )
{
int x=1,y= -2,z=3,k;
k=x<y<z;
printf(%d,k);
}
1.17 Write the output of the following code
void main( )
{
int a=1,b= -2, c=3, d=0, k;
k=a>b<c!=d>a==d<a;
printf(%d,k);
}
1.18 What will be output of the following c
program?
#include<stdio.h>
int main()
{
int a=10, b= - 20, c=0, k;
k=a||b&&c&&b||a&&b||c;
printf(%d,k);
return 0;
}
1.19 What will be output of the following c
program?
#include<stdio.h>
int main()
{
Page 1
PROGRAMMING IN C
(Fundamentals, Operators & Expressions)
sl=sizeof(111);
sm=sizeof(111);
printf(%d,%d,%d,%d,%d,si.sj.sk,sl,sm);
return 0;
}
1.24 What would be the output ?
void main()
{
int x=10, y=17;
if(x>y)
printf(KIIT);
else if (x-y)
printf(KISS);
else
printf(KIMS);
}
1.25 What will be output of the following c
program?
#include<stdio.h>
int main()
{
int x=1,y= -2;
if(x=y);
{
x=x+y;
}
printf(%d,x+y);
return 0;
}
1.26 What will be output of the following c
program?
void main( )
{
int x=5;
if (1>x<8)
printf ("WORLD');
else
printf ("UNIVERSE')
return 0;
}
1.27 What will be output of the following c
program?
int main()
{
Page 2
PROGRAMMING IN C
(Fundamentals, Operators & Expressions)
Page 3