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 |
how to return a multiple value from a function?
What is your nationality?
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
What are segment and offset addresses?
how to concatenate the two strings
How will u find whether a linked list has a loop or not?
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }