Identify the error in the following program.
include<iostream>
using namespace std;
void main()
{
int num[]={1,2,3,4,5,6};
num[1]==[1]num ? cout<<"Success" : cout<<"Error";
}



Identify the error in the following program. include<iostream> using namespace std; void ma..

Answer / hr

num [1] = [1] num?. You should write index number after array name but here index number is mention before array name in [1] num
So expression syntax error will be shown.
Correction : num[1] = num[1]? is the correct format.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Write a C++ Program to Check Whether a character is Vowel or Consonant.

2 Answers  


CDPATH shell variable is in(c-shell)

0 Answers   Siemens,


What are the advantages/disadvantages of using inline and const?

0 Answers   Amazon,


what is a pragma in C++?

0 Answers   Aspire,


Briefly explain various access specifiers in C++.

0 Answers   Amdocs,


In C++ what is a vtable and how does it work?

0 Answers   Agilent,


What is a virtual base class?

6 Answers   Fidelity, Siemens,


What is the purpose of a constructor? Destructor?

0 Answers   Amazon,


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


What is Boyce Codd Normal form?

0 Answers   IBS,


write a program To generate the Fibonacci Series.

0 Answers   Accenture,


What does it mean to take the address of a reference?

0 Answers   Amazon,


Categories