Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the output of the given program?
Home
C Plus Plus
What is the output of the given program?
+2
votes
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
What is the output of the given program?
#include < stdio.h >
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
a) -15
b) -30
c) Compiler error
d) Garbage value
#c
-program
#program-output
Please
log in
or
register
to answer this question.
1
Answer
+1
vote
answered
Jan 21, 2021
by
SakshiSharma
b) -30
Related questions
0
votes
Q: What will happen if "In a C++ program a class has no name"?
asked
Jan 24, 2021
in
JAVA
by
rajeshsharma
#c
-program
constructor
java
Java-questions-answers
+1
vote
Q: Read the Following program:
asked
Jan 19, 2021
in
Python
by
SakshiSharma
#python-output
#program-output
Python-questions-answers
0
votes
Q: What will be the output of the following snippet , if we pass 3e,5?
asked
Jan 17, 2021
in
Python
by
SakshiSharma
#program-output
Python-questions-answers
+1
vote
Q: For inserting a new line in C++ program, which one of the following statements can be used?
asked
Jan 20, 2021
in
C Plus Plus
by
SakshiSharma
#c
-new-line
new-line-character
0
votes
Q: What is the basic structure of a C++ program?
asked
Jun 9, 2020
in
C Plus Plus
by
Robindeniel
#c
-structure
-program-structure
+1
vote
Q: What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
#c
language
+1
vote
Q: What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
#c
language
+1
vote
Q: What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
#c
language
+2
votes
Q: Consider the following given program and choose the most appropriate output from the given options:
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
program-output
+2
votes
Q: Consider the following given program and choose the most appropriate output from the given options:
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
program-output
...