Home

What is right way to Initialization array?

A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;

B. int n{} = { 2, 4, 12, 5, 45, 5 } ;

C. int n{6} = { 2< 4< 12 } ;

D. int n(6) = { 2, 4, 12, 5, 45, 5 } ;

You can do it
  1. ------ is the ternary operator
  2. The output of the following code is: main() { xyz: goto abc;printf("Hello"); abc: printf("World");goto…
  3. C programs are converted into machine language with the help of
  4. Bitwise operators can operate upon?
  5. printf() is not a library function.
  6. When is std::bad_alloc exception thrown?
  7. Which of the following is not a standard exception built in C++.
  8. In the expression - 'x + y + 3z =20'
  9. The output of the following code is:void change (char *k) {k="Hello";return; } main() { char *ch = "World";;change(ch);…
  10. All macro substitutions in a program are done before compilation of the program.
  11. All elements of a structure are allocated contiguous memory locations.
  12. strcat() function ----------------------- two strings.
  13. Which of the following is a valid destructor of the class name "Country"
  14. The main() function can call itself recursively.
  15. The output of the following code is: main() {int a = 5, b = 6; (a == b? printf("%d", a)); }
  16. The output of the following code is: main() { unsigned int a = 10; while (a>=10) { int a; a-- ; }…
  17. Right shifting an operand 1bit is equivalent to multiplying it by 2.
  18. What is an array?
  19. continue statement is used
  20. Single operations involving entire arrays are permitted in C.
  21. Structures within structures cannot be created.
  22. The identifier argv[] is a pointer to an array of strings.
  23. struct stud{int roll;char name[20];float marks;} *p;What will be the byte size of p?
  24. Character data types cannot be declared as unsigned.
  25. Which one of the following is not a valid reserved keyword in C++
  26. A function to be called must be ended with a----------------
  27. A declaration float a, b; occupies ___ of memory
  28. printf("%d", sizeof('2')); will print 2.
  29. What will be output if you will compile and execute the following c code?#include int main(){ float…
  30. The default initial value of automatic storage class is 0.