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...

what is the output of following question?

void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}

Answer Posted / vignesh1988i

my opinion or wat i think is that ,
a[i]=i++; is given so...

here i++ is a post increment operation , so first it will assign the value to a[0]=0 , so a[0] will have 0 , and in next line a[i] is given in printf , so the value a[1] should get printed that will be garbage value.......


thank u

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does pointer work in c?

1121


List the different types of c tokens?

1072


What is structure pointer in c?

1050


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1056


What is a scope resolution operator in c?

1271


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1008


How does sizeof know array size?

1117


what do u mean by Direct access files? then can u explain about Direct Access Files?

2087


What is the use of header files?

1105


What are qualifiers?

1045


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1098


What are the different types of control structures in programming?

1128


Differentiate between static and dynamic modeling.

1112


Tell me about low level programming languages.

1123


Explain the process of converting a Tree into a Binary Tree.

2666