How will you print % character?
a. printf(“\%”)
b. printf(“\\%”)
c. printf(“%%”)
d. printf(“\%%”)
Answers were Sorted based on User's Feedback
Answer / ajay kumar
. printf("\%")
this is most genertally prefered for printing a %
u can also print % by printf("%");
but according to K&R(a standrad textbvuk by developer of C)
"\%" is prefered
If u have any queries mail me @ kumar.guttikonda@gmail.com
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / govind verma
using printf("%%");
bcoz compiler place %% to % ....... this grammr written in compiler,,,,,,
| Is This Answer Correct ? | 3 Yes | 1 No |
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
main() { show(); } void show() { printf("I'm the greatest"); }
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
main() { extern int i; i=20; printf("%d",sizeof(i)); }
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
write a c program to print magic square of order n when n>3 and n is odd?
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
main() { int i=5,j=6,z; printf("%d",i+++j); }
Derive expression for converting RGB color parameters to HSV values