Predict the Output: printf(“%d”, sizeof(‘A’)); printf(“%d”, sizeof(65)); Explain what is printed and why? Consider the code is fully formed, i.e., no excuses like missing main(), missing stdio.h, etc.
Blog
Consider these two string variables: char str1[] = “compute…
Consider these two string variables: char str1[] = “computer”; char str2[ 20 ]; How do you assign str1 to str2 so that both strings have the same characters?
What is the output of the following code? char name[6] = “k…
What is the output of the following code? char name[6] = “kev\0in”; int i = 0;for(i = 0; i < 6; i++){ printf("%c",name[i]);}
What is the format specifier for a double?
What is the format specifier for a double?
You want to create a constant value using #define to represe…
You want to create a constant value using #define to represent the number 37. Which of the following is correct?
How many times does this while loop iterate? int a = 1; whi…
How many times does this while loop iterate? int a = 1; while ( a = 1 ) { }
Where is the entry point of a C program?
Where is the entry point of a C program?
Which of the following statements is not true about booleans…
Which of the following statements is not true about booleans in C?
In vim, which of the following keys can take you from Insert…
In vim, which of the following keys can take you from Insert mode to Command mode?
What is the value of the result at the end of this code bloc…
What is the value of the result at the end of this code block? char str[] = { ‘1’, ‘2’, ‘3’, ‘4’, ‘\0’ }; int result = strlen( str );