"My salary was increased by 15%" Select the statement, which will EXACTLY reproduce the line of text above.
A. printf("My salary was increased by 15/%!");
B. printf("My salary was increased by 15%!");
C. printf("My salary was increased by 15'%'!");
D. printf("My salary was increased by 15%%!");
Answer: Option D
Join The Discussion
Comments ( 35 )
Related Questions on C Fundamentals
What is the primary purpose of a function prototype in C?
A. Declare a variable
B. Declare a function
C. Define a function
D. Assign a value
What is the correct syntax for declaring a variable in C?
A. int variable_name;
B. variable_name = 5;
C. variable_name int;
D. int = variable_name;
because one %is for 15 and another for declaration
It's gud to answer
printf("My salary was increased by 15%%");
How is it..! Explain.
%%=% same as. ==--=
Please explain once again
in printf function to print special characters as it is , we use the percentage(%) sign before the special character ,
for example
#include
#include
main()
{
printf("%&");
}
this will produce out put "&"
#include
#include
main()
{
printf("%@");
}
this will produce output "@"
can anyone explain it please
To print a % we need to use %% otherwise it will not understand what to print.
Correct answer is D
B and D answer same so worng options correct answer(B and D)
If %% is given in printf means it will a single %..so the answer is printf("My salary was increased by 15%%");
option is wrng
How it is possible, can any one explain ?
answer is wrong please correct it
If we give as per the option, then the output is displayed with "!" at the end of the statement. But the required output is without "!". So please give the correct solution to this.....
Naacho
how it is possible
if %% will given two time it will print it two time their is no doubt .... answer is wrong
Its wrong...how there can be % be two times...
how
howw ????????
howw ????????
?????????????????????? why
plzzz explain??????????????????????? how
how ?
explain again
If there are two backslash// symbols then they will be treated as specially and what's is the explanation of two percentage symbols
how????
Pls explain the concept of two percent symbol in printf
printf("my salary was increased by 15%%!");
why we use two percentage sign not one.
plz explain.
y 2 % is used?
Y two % symbols are used?
why this happend..?
'%%' is used to produce '%' in output in print function.
'!' doesn't have any effect on output. fyi only...
printf("My salary was increased by 15%%!");
this will print the required line.