Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is code reusability in c++?

1242


How do you work around them?

1045


What is the difference between malloc, calloc and realloc?

1031


Which should be more useful: the protected and public virtuals?

1029


What c++ library is string in?

1046


What do you mean by overhead in c++?

1083


Which operator cannot overload?

1042


What is c++ code?

1108


When is dynamic checking necessary?

1108


What is the difference between a declaration and a definition?

1107


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

1047


How the keyword struct is different from the keyword class in c++?

1035


When do we use copy constructors?

1079


What is a memory leak c++?

1130


In a function declaration what does extern means?

1043