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


#include<stdio.h>

main()

{

int a[3];

int *I;

a[0]=100;a[1]=200;a[2]=300;

I=a;

Printf(“%d\n”, ++*I);

Printf(“%d\n”, *++I);



Printf(“%d\n”, (*I)--);

Printf(“%d\n”, *I);

}

what is the o/p



a. 101,200,200,199

b. 200,201,201,100

c. 101,200,199,199

d. 200,300

Answers were Sorted based on User's Feedback



#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a..

Answer / shraddhacpawar

a

Is This Answer Correct ?    17 Yes 2 No

#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a..

Answer / r.gopala krishnan (gk)


Explanation:
now 'I' variable pointing the base address of the
Array......
1.printf("%d\n",++*I); //I=a[0], bcos I is pointing the
base address. first Increamenting the value so,a[0]=100
become an ( a[0]=101 ).
2.printf("%d"\n,*++I); //This Increment will increment
the address not value. so, now ( I=a[1]=200 ).
3.printf("%d\n",*I--); // now I=a[1]=200 so value will
not change.
4.printf("%d\n",*I); //Now also I=a[1] pointing here only
but a[1]=199, bcos in previous printf after executing we
decrementing the value. a[1]=199......

ANS: a)101,200,200,199

Is This Answer Correct ?    12 Yes 0 No

#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a..

Answer / kedar

a

Is This Answer Correct ?    1 Yes 0 No

#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a..

Answer / ashwini

c

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

Write the test cases for checking a variable having value in range -10.0 to +10.0?

0 Answers   Bosch,


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

0 Answers   HCL,


What is a buffer in c?

0 Answers  


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

0 Answers   Infosys,


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

0 Answers   College School Exams Tests,


Explain what is the use of a semicolon (;) at the end of every program statement?

0 Answers  


Tell me what are bitwise shift operators?

0 Answers  


Write a program to print prime nums from 1-20 using c programing?

13 Answers   IBM,


What are static functions?

1 Answers  


define switch statement?

6 Answers   CTS,


Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?

4 Answers  


How can I write a function that takes a format string and a variable number of arguments?

0 Answers  


Categories