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


main()

{

int i =10, j = 20;

clrscr();

printf("%d, %d, ", j-- , --i);

printf("%d, %d ", j++ , ++i);

}

a. 20, 10, 20, 10

b. 20, 9, 20, 10

c. 20, 9, 19, 10

d. 19, 9, 20, 10

Answers were Sorted based on User's Feedback



main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / guest

c)

Is This Answer Correct ?    35 Yes 3 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / chand

ITS c 20 9 19 10

Is This Answer Correct ?    7 Yes 2 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / ramya

for right increment the value not change.
for the left increment the value change.
so j++=20,--i=9,j++=20,++i=10.

Is This Answer Correct ?    0 Yes 1 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / manoj singh

b.20,9,20,10

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Code Interview Questions

main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 Answers  


String reverse with time complexity of n/2 with out using temporary variable.

10 Answers   NetApp, Symantec,


main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }

2 Answers  


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

9 Answers   Microsoft,


write a c program to Reverse a given string using string function and also without string function

1 Answers  


How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

11 Answers   Deshaw, Infosys,


Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).

1 Answers  


C program to print magic square of order n where n > 3 and n is odd

2 Answers   Accenture,


main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

6 Answers  


main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;

1 Answers  


Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

7 Answers   Microsoft,


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


Categories