In the following code snippet what value will be printed


In the following code snippet, what value will be printed for c and d before the loop is executed?

What value will be printed afterward?

Why do you feel that this will occur? (Code needed to make this a complete program intentionally left out.)

int c = 99;
int a[5];
int d = 12;
printf("c = %dn",c);
printf("d = %dn",d);
while (c < 3)
{
printf("%dn",c);
c++;
}
a[5] = 0;
printf("c = %dn",c);
printf("d = %dn",d);
printf("Donen");
c = getchar();

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: In the following code snippet what value will be printed
Reference No:- TGS01248721

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)