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

Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }

3 Answers  


what is oop?

3 Answers  


int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

2 Answers  






Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.

5 Answers   Amazon, Microsoft,


write a program for area of circumference of shapes

0 Answers  


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.

2 Answers   Wipro,


Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

1 Answers  


can u give me the c codings for converting a string into the hexa decimal form......

1 Answers  


int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


write a origram swaoing valu without 3rd variable

2 Answers  


Categories