ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

C++ Quiz


  • Please log in to reply
C++ Quiz

#1

aldo007
aldo007
    Offline
    0
    Rep
    18
    Likes

    Dio

  • PipPipPipPipPipPip
Posts: 294
Threads: 17
Joined: Jan 02, 2019
Credits: 0

Five years registered
#1

According to the C++17 standard, what is the output of this program?

   
#include <iostream>
int main() {
  std::cout << 1["ABC"];
}


  • 0

#2

Dogeking
Dogeking
    Offline
    37
    Rep
    138
    Likes

    Veteran

Posts: 533
Threads: 36
Joined: Sep 18, 2015
Credits: 0

Eight years registered
#2

According to the C++17 standard, what is the output of this program?

   
#include <iostream>
int main() {
  std::cout << 1["ABC"];
}

B


  • 1

#3

SaintBooster
SaintBooster
    Offline
    4
    Rep
    87
    Likes

    Premium Seller

  • PipPipPipPipPipPipPip
Posts: 473
Threads: 34
Joined: Jul 20, 2018
Credits: 0

Deal with caution
User has an open scam report.
Five years registered
#3

ANS-

 

B

 

 

Ref-https://stackoverflo...rray-in-c-and-c


  • 0

?url=https%3A%2F%2Fi.imgur.com%2Fo3OqjFf


#4

Teftef
Teftef
    Offline
    0
    Rep
    0
    Likes

    Member

Posts: 31
Threads: 0
Joined: Jan 06, 2019
Credits: 0
Five years registered
#4

It would output the character with index 1 in the array, which is B in this case


  • 0


 Users browsing this thread: