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";
}



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++ General Interview Questions

Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

0 Answers  


When should overload new operator on a global basis or a class basis?

0 Answers  


Describe new operator and delete operator?

0 Answers  


What is the difference between public and private data members?

0 Answers  


Consider a c++ template funtion template<class T> T& Add(T a, T b){return a+b ;} if this function is called as T c = Add("SAM", "SUNG"); what will happen? What is the problem in the template declaration/ How to solve the problem.

7 Answers   LG, Samsung,






What is cin clear () in c++?

0 Answers  


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

0 Answers  


What does I ++ mean in c++?

0 Answers  


Is it possible to use a new for the reallocation of pointers ?

0 Answers  


What is the difference between a pointer and a link in c ++?

0 Answers  


What is a virtual destructor? Explain the use of it?

0 Answers  


What is the basic concept of c++?

0 Answers  


Categories