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 the latest c++ version?
What do you mean by overloading?
Is it possible to provide special behavior for one instance of a template but not for other instances?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is static variable and difference between(const char *p,char const *p,const char* const p).
How do you differentiate between overloading the prefix and postfix increments?
What is RTTI and why do you need it?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
Explain the pure virtual functions?
What are stacks? Give an example where they are useful.
What is pair in c++?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
Is java based off c++?
Write about the various sections of the executable image?
Const char *p , char const *p What is the difference between the above two?