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


12. Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV

Answers were Sorted based on User's Feedback



12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",..

Answer / rakesh

B)only 2

Is This Answer Correct ?    4 Yes 1 No

12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",..

Answer / basha

error: wrong type argument to increment

Is This Answer Correct ?    2 Yes 1 No

12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",..

Answer / fakkad

2

Is This Answer Correct ?    1 Yes 1 No

12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",..

Answer / jaleelbaig

2 gives the error because array name is nothing but a
constant pointer we cannot increment the constant pointer so
it will give error

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

biggest of two no's with out using if condition statement

5 Answers  


write a program which counts a product of array elements lower than 10.

1 Answers  


What are the 32 keywords in c?

0 Answers  


How do shell structures work?

0 Answers  


What are the 4 types of organizational structures?

0 Answers  


Why isn't it being handled properly?

0 Answers  


What are structures and unions? State differencves between them.

0 Answers   iNautix,


What is pass by value in c?

0 Answers  


Explain what’s a signal? Explain what do I use signals for?

0 Answers  


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

0 Answers  


Add 2 64 bit numbers on a 32 bit machine

3 Answers   EMC, Hyderabad Central University, NetApp,


What is maximum size of array in c?

0 Answers  


Categories