What is the value of integer variable b, if we find programming statement like b=printf(“ES-CS201”); ans. 8 6 garbage value 7
Question
What is the value of integer variable b, if we find programming statement like b=printf(“ES-CS201”);
ans. 8
6
garbage value
7
Solution
The value of the integer variable b will be 8. This is because the printf function returns the number of characters that are printed. In this case, "ES-CS201" has 8 characters, so b will be assigned the value 8.
Similar Questions
What is the output of this statement printf(“%d”, (a++)); ?Answer areaA. The value of (a + 1)B. The current value of aC. Error messageD. Garbage
What is The Output of the following program? #include<stdio.h>void main(){int i = printf("00"); int i =printf("00"); printf("%d",i);}000002Garbage value
In the below code -For what value of n does the program print 21 ?
What will be the output of the following code snippet?1234567#include <stdio.h>int main() { int a = 5, b = 10; int result = a == b ? a + b : a - b; printf("%d", result); return 0;}
When using printf, which of the following is the format specifier for an integer?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.