Question: 1 . ( 2 0 points ) What is the output of the following C program? If you believe there are compile errors or potential

1.(20 points) What is the output of the following C program? If you believe there are compile errors or potential runtime errors, you should point out all the errors. You should be able to tell the answer without compiling or running it.
#include
int main()
{
int x=4;
int *q=&x;
(*q)+=1; x+=2;
int y=x*((*q)-1);
printf("y is %d
",y);
return 0;
}
2.(20 points) What is the output of the following C program? If you believe there are compile errors or potential runtime errors, you should point out all the errors. You should be able to tell the answer without compiling or running it.
#include
int main()
{
int x=6;
int *q=&x, &qq=*x;
(*q)-=2; (*qq)+=3;
int y=(*qq)*((*q)-2);
printf("y is %d
",y);
return 0;
}
3.(20 points) What is the output of the following C program? If you believe there are compile errors or potential runtime errors, you should point out all the errors. You should be able to tell the answer without compiling or running it.
#include
int main()
{
int x=23,y=8;
int q=x/y,r=x%y,r1=(x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!