Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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


Please Help Members By Posting Answers For Below Questions

Tell me difference between constant pointer and pointer to a constant.

430


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

421


What is difference between class and structure in c++?

389


If I is an integer variable, which is faster ++i or i++?

396


What is rvalue?

450






Why do we use string in c++?

357


How to declare a function pointer?

372


Is overriding possible in c++?

374


How is modularity introduced in C++?

457


Write about an iterator class?

402


What are friend classes?

411


Does c++ vector allocate memory?

337


Mention the ways in which parameterized can be invoked. Give an example of each.

374


How is computer programming useful in real life?

383


Can you overload the operator+ for short integers?

405