Professional Documents
Culture Documents
Punjab College Gujrat - Girls Campus: Predict The Output of The Following Code. 2x4 8 Question #1 Question #2
Punjab College Gujrat - Girls Campus: Predict The Output of The Following Code. 2x4 8 Question #1 Question #2
Punjab College Gujrat - Girls Campus: Predict The Output of The Following Code. 2x4 8 Question #1 Question #2
I.C.S
Student Name:
Section:
_____________
_____________
Date:
Marks:
_____________
Question #3
{
intnum=15;
num+=5
num*=2;
printf(value of num is
%d,num);
}
Question #2
void main()
{
int x=10;
int y=15;
float z=12.6;
printf("x= %d \t",x);
printf("y=%d \t",y);
printf("z=%3.1f",z);
printf("\n");
getch();
}
Question#4
#include<stdio.h>
void main()
{
int x;
x= -2 + 11 - 7 * 9 % 6 / 12;
printf("%d",x);
getch() ;
}
Computer Science
I.C.S
Question#1
Correction:
void main()
{
int = 10 ;
char = d
k=d+d;
printf(%d,k);
}
Question#2
Correction:
void main()
{
intx= 10 ;
x+5=y
Printf(%d,y);
}
Question#3
Correction:
void main();
{
int n ;
scanf(%f.k);
float sum=n+k;
printf(%d,sum);
}
i.
$cash
ii.
Total Marks
iii.
iv.
v.
Room#
_num
1.var
Computer Science
I.C.S