How will you print % character?

a. printf(“\%”)

b. printf(“\\%”)

c. printf(“%%”)

d. printf(“\%%”)

Answers were Sorted based on User's Feedback



How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”..

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

How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”..

Answer / govind verma

using printf("%%");
bcoz compiler place %% to % ....... this grammr written in compiler,,,,,,

Is This Answer Correct ?    3 Yes 1 No

How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”..

Answer / anupriya

printf("%");

Is This Answer Correct ?    0 Yes 1 No

How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”..

Answer / guest

c) printf(" %% ");

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Code Interview Questions

‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 Answers  


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above

4 Answers   HCL, LG,


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


How we print the table of 3 using for loop in c programing?

7 Answers  


main() { extern int i; i=20; printf("%d",i); }

1 Answers   Value Labs,


create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"

2 Answers  


program to find magic aquare using array

4 Answers   HCL,


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


write a program to Insert in a sorted list

4 Answers   Microsoft,


Categories