Model Paper 2
Answer the Following Questions
Q1: what is the output of the following program
main()
{
int cnt,i=7;
cnt/=i;
printf(ā%dā,cnt);
}
Q2: what will be the output?
void increment()
{
return x++;
}
for(x=0;x<10;increment())
{
some operation;
}
Q3: what is the output?
int modifycalue()
{
x=x+10;
}
int changevalue(x)
{
x=x+1;
}
void main()
{
int x=10;
changevalue(x);
x++;
printf("%d", x);
x++;
printf("%d", x);
modifyvalue();
printf("%d", x);
}