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=-1;

-i;

printf("i = %d, -i = %d \n",i,-i);

}



main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }..

Answer / susie

Answer :

i = -1, -i = 1

Explanation:

-i is executed and this execution doesn't affect the value
of i. In printf first you just print the value of i. After
that the value of the expression -i = -(-1) is printed.

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Code Interview Questions

main() { int i=400,j=300; printf("%d..%d"); }

3 Answers  


main() { int i = 3; for (;i++=0;) printf(ā€œ%dā€,i); }

1 Answers   CSC,


int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too

1 Answers  


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  


main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above

4 Answers   HCL, LG,


pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"

2 Answers  


can u give me the c codings for converting a string into the hexa decimal form......

1 Answers  


write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??

0 Answers   Nagarro,


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

0 Answers  


Categories