void main()
{
int i=10, j=2;
int *ip= &i, *jp = &j;
int k = *ip/*jp;
printf(“%d”,k);
}
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 |
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
Who could write how to find a prime number in dynamic array?
WAP to display 1,2,3,4,5........N
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
main() { char not; not=!2; printf("%d",not); }