What is the output of the following program? Read the choices before answering.
#include<stdio.h>
int main()
{
int a,b;
printf(enter a,b: );
scanf("%d%d",&a,b);
printf("%d %d",a,b);
return 0;
}
#include<stdio.h>
int main()
{
int a,b;
printf(enter a,b: );
scanf("%d%d",&a,b);
printf("%d %d",a,b);
return 0;
}
Input:
4 5
choices:
1. compile error
2. compilation success, but program stops when run
3. 4 5
4. strange output
5. None of the above
No comments:
Post a Comment