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 a=10,*j;

void *k;

j=k=&a;

j++;

k++;

printf("\n %u %u ",j,k);

}



main() { int a=10,*j; void *k; j=k=&a; j++; k+..

Answer / susie

Answer :

Compiler error: Cannot increment a void pointer

Explanation:

Void pointers are generic pointers and they can be used only
when the type is not known and as an intermediate address
storage type. No pointer arithmetic can be done on it and
you cannot apply indirection operator (*) on void pointers.

Is This Answer Correct ?    22 Yes 2 No

Post New Answer

More C Code Interview Questions

What are segment and offset addresses?

2 Answers   Infosys,


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,


write a c-program to display the time using FOR loop

3 Answers   HCL,


main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

2 Answers   Wipro,


How we will connect multiple client ? (without using fork,thread)

3 Answers   TelDNA,


write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


What is the main difference between STRUCTURE and UNION?

13 Answers   HCL,


x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  


Print an integer using only putchar. Try doing it without using extra storage.

2 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


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,


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


Categories