Computer Science, asked by hoobhi123, 2 months ago

What is output of the following program?
#include <iostream>
using namespace std;
int x = 19;
int main()
{
int x = 21;
{ (
int X = 41;
cout <<::x<<x<<::X<<"\n";
return 0;
3
a. 414141
b. 194121
c. 214121
d. 194119​

Answers

Answered by Aryansingh001
1

Answer:

Your output gives  a error

main.cpp:16:6: error: expected primary-expression before ‘int’

    (int X = 41;

     ^~~

main.cpp:16:6: error: expected ‘)’ before ‘int’

main.cpp:17:24: error: ‘::X’ has not been declared

     cout <<::x << x <<::X << "\n";

                       ^~

main.cpp:18:14: error: expected ‘}’ at end of input

     return 0;

             ^

main.cpp:18:14: error: expected ‘}’ at end of input

Explanation:

Sorry brother but there is erorr in that programm

plz download solo learn for phone or visual stu.. for p.c

and try it by your self

Attachments:
Similar questions