Home

What would be the output of the following program?
int x=40;
main(){
int x=20;
printf("
%d",x);
}

A. 40

B. 20

C. Compilation Error

D. Garbeg Value

Please do not use chat terms. Example: avoid using "grt" instead of "great".

You can do it
  1. The output of the following code is: main() { int k, num = 30; k = (num > 5 ? (num <= 10 ? 100…
  2. Which escape character can be used to beep from speaker in C?
  3. The output of the following code is: void main() {int a; int &b = a;a=100; printf("b=%d\ta=%d",…
  4. Nested macros are allowed.
  5. Right shifting an operand 1bit is equivalent to multiplying it by 2.
  6. For 16bit compiler allowable range for integer constants is ______ ?
  7. Which one of the following is not a valid reserved keyword in C++
  8. The function fopen() on failure returns---------------------.
  9. Which of the following is an example of compounded assignment statement?
  10. What will be output if you will compile and execute the following c code?#include int main(){ char c=125;…
  11. The default initial value of automatic storage class is 0.
  12. When is std::bad_alloc exception thrown?
  13. && and & operators have the same meaning.
  14. char *s[10] defines an array of ------------------------
  15. The array 'char name[10] can consist of a maximum of 9 characters.
  16. The identifier argv[] is a pointer to an array of strings.
  17. The expression "b = 3 ^ 2;" will evaluate b = 9.
  18. The main() function can be called from any other function.
  19. Character data types cannot be declared as unsigned.
  20. The value of an enumerated datatype can be read using scanf() function.
  21. The output of the following code is: void main(){int z, a = 5, b = 3; z = a * 2 + 26 % 3;printf("%d",…
  22. Operation between an integer and float always yields a float result.
  23. A multidimensional array A[10][9] can store-------- number of elements
  24. The output of the following code is: main() { xyz: goto abc;printf("Hello"); abc: printf("World");goto…
  25. Which classes allow primitive types to be accessed as objects?
  26. All elements of a structure are allocated contiguous memory locations.
  27. struct stud{int roll;char name[20];float marks;} *p;What will be the byte size of p?
  28. A function to be called must be ended with a----------------
  29. The printf() function retunes which value when an error occurs?
  30. The output of the following code is: main() {int a = 5, b = 6; (a == b? printf("%d", a)); }