1.

36. (a) Find the output of the following program:#include#includetypedef char Str80[80];void main(){char *Notes;Str80 Str = "vR2GooD" ;int L = 6;Notes = Str ;while(L >= 3){ Str[L] = (isupper(Str[L]) ?tolower(Str[L]) : toupper(Str[L]));cout

Answer»

Answer:

you will get error when you compile that program

Error you get:

main.cpp:4:11: error: ‘::main’ must return ‘int’

main.cpp:13:1: error: ‘cout’ was not declared in this scope

main.cpp:13:1: note: suggested ALTERNATIVE:

In FILE included from main.cpp:1:0:

/usr/include/c++/6/iostream:61:18: note:   ‘std::cout’

  EXTERN ostream cout;  /// Linked to standard output

                 ^~~~

main.cpp:13:18: error: ‘endl’ was not declared in this scope

main.cpp:13:18: note: suggested alternative:

In file included from /usr/include/c++/6/iostream:39:0,

                from main.cpp:1:

/usr/include/c++/6/ostream:590:5: note:   ‘std::endl’

    endl(basic_ostream<_chart _traits="">& __os)

    ^~~~

Explanation

You have to compile the program yourself and check that it works and then you have to ask the output



Discussion

No Comment Found