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


void main()

{

int i=10, j=2;

int *ip= &i, *jp = &j;

int k = *ip/*jp;

printf(“%d”,k);

}



void main() { int i=10, j=2; int *ip= &i, *jp = &j; int ..

Answer / susie

Answer :

Compiler Error: “Unexpected end of file in comment
started in line 5”.

Explanation:

The programmer intended to divide two integers, but by the
“maximum munch” rule, the compiler treats the operator
sequence / and * as /* which happens to be the starting of
comment. To force what is intended by the programmer,

int k = *ip/ *jp;

// give space explicity separating / and *

//or

int k = *ip/(*jp);

// put braces to force the intention

will solve the problem.

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


main() { int a[10]; printf("%d",*a+1-*a+3); }

1 Answers  


what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }

10 Answers  


main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,


Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4

2 Answers   HCL,


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

0 Answers  


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

2 Answers   Wipro,


writte a c-programm to display smill paces

2 Answers  


to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD

6 Answers   Synergy,


How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!

1 Answers  


Write a single line c expression to delete a,b,c from aabbcc

2 Answers   Microsoft,


Categories