R

Ram Sharma • 193.86K Points
Coach

Q. What is the output of C program with strings?

Code:
int main()
{
    char var='b';
    printf("%d ", sizeof("a"));
    printf("%d ", sizeof('b'));
    printf("%d ", sizeof(10));
    printf("%d ", sizeof(var));
}
//int size is 2 bytes
  • (A) 2 2 2 2
  • (B) 2 2 2 1
  • (C) 2 1 2 1
  • (D) 1 1 1 1

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics