What is the output of C Program.? int main() { int a=0; a = printf("4"); printf("%d",a); return 0; }
A) 04
B) compiler error
C) 40
d) 41
Answers
Answered by
2
Answer:
option: d) 41
Explanation:
Answered by
0
The output of C Program is 41 ( Option d is the correct answer)
- According to the question the following C program is
- int main()
{
int a=0;
a = printf("4");
printf("%d",a);
return 0;
}
- Now when we will compile this mentioned C program where a = printf("4");
- It first printf prints 4.
- Then, the function printf() returns 1.
- Now the variable a=1; So 1 is printed next.
Hence, the following C Program's Output is 41
#SPJ3
Similar questions
World Languages,
4 months ago
Psychology,
4 months ago
English,
4 months ago
French,
9 months ago
English,
9 months ago