main()
{
float f=5,g=10;
enum{i=10,j=20,k=50};
printf("%d\n",++k);
printf("%f\n",f<<2);
printf("%lf\n",f%g);
printf("%lf\n",fmod(f,g));
}
Answer / susie
Answer :
Line no 5: Error: Lvalue required
Line no 6: Cannot apply leftshift to float
Line no 7: Cannot apply mod to float
Explanation:
Enumeration constants cannot be modified, so you cannot
apply ++.
Bit-wise operators and % operators cannot be applied on
float values.
fmod() is to find the modulus values for floats as %
operator is for ints.
| Is This Answer Correct ? | 12 Yes | 6 No |
why the range of an unsigned integer is double almost than the signed integer.
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.
2 Answers Mentor Graphics, Microsoft,
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(ā%dā,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(ā%dā,*cptr); }
How we print the table of 3 using for loop in c programing?
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main() { clrscr(); } clrscr();
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
what is variable length argument list?