What will be the output of the following C++ code?

#include <iostream> using namespace std; int main() { char arr[20]; int i; for(i = 0; i < 10; i++) *(arr + i) = 65 + i; *(arr + i) = ‘\0’; cout << arr; return(0); } a) ABCDEFGHIJ b) AAAAAAAAAA c) JJJJJJJJ d) AAAAAAJJJJ

What will be the output of the following C++ code?

#include <iostream> using namespace std; int g = 100; int main() { int a; { int b; b = 20; a = 35; g = 65; cout << b << a << g; } a = 50; cout << a << g; return 0; } a) 2035655065 b) 2035655035 c) 2035635065 d) 2035645065

What will be the output of the following C++ code?

#include <iostream> using namespace std; int main() { int i; enum month { JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; for (i = MAR; i <= NOV; i++) cout << i; return 0; } a) 01234567891011 b) 123456789101112 c) 34567891011 d) 123456789

What will be the output of the following C++ code?

#include <iostream> using namespace std; enum colour { green, red, blue, white, yellow, pink }; int main() { cout << green<< red<< blue<< white<< yellow<< pink; return 0; } a) 012345 b) 123456 c) compile time error d) runtime error

What will be the output of the following C++ code?

#include <iostream> using namespace std; enum cat { temp = 7 }; int main() { int age = 14; age /= temp; cout << “If you were cat, you would be ” << age << endl; return 0; } a) If you were cat, you would be 5 b) If you were cat, you would … Read more