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";
}
Answer Posted / 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 View All Answers
what is template and type convertion
what is data abstraction in C++?
Does c++ have arraylist?
What is abstraction with example?
What is pointer to member?
What is namespace & why it is used in c++?
What do you mean by volatile and mutable keywords used in c++?
Define a nested class. Explain how it can be useful.
Can we use struct in c++?
What is jump statement in C++?
What is the use of c++ programming language in real life?
Is stl open source?
How much do c++ programmers make?
What do you mean by late binding?
What is c++ w3school?