Examveda
Examveda

"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


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Comments ( 35 )

  1. MAHIBOOB JILANI
    MAHIBOOB JILANI :
    12 months ago

    because one %is for 15 and another for declaration

  2. AKASH A
    AKASH A :
    2 years ago

    It's gud to answer

  3. Aashish Bhandari
    Aashish Bhandari :
    3 years ago

    printf("My salary was increased by 15%%");

  4. Sahilendra Kumar
    Sahilendra Kumar :
    4 years ago

    How is it..! Explain.

  5. Pettela Saranya
    Pettela Saranya :
    4 years ago

    %%=% same as. ==--=

  6. Vajragotti Pooja
    Vajragotti Pooja :
    5 years ago

    Please explain once again

  7. Avinav Nayak
    Avinav Nayak :
    5 years ago

    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 "@"

  8. Devi Chikkam
    Devi Chikkam :
    6 years ago

    can anyone explain it please

  9. Jugnu Kumar
    Jugnu Kumar :
    6 years ago

    To print a % we need to use %% otherwise it will not understand what to print.

  10. Deepak Prajapati
    Deepak Prajapati :
    6 years ago

    Correct answer is D

  11. Ravi K
    Ravi K :
    6 years ago

    B and D answer same so worng options correct answer(B and D)

  12. Vaishnavi Ramar
    Vaishnavi Ramar :
    6 years ago

    If %% is given in printf means it will a single %..so the answer is printf("My salary was increased by 15%%");

  13. Priya Dharsani
    Priya Dharsani :
    6 years ago

    option is wrng

  14. AMBATI MALLIKARJUNA
    AMBATI MALLIKARJUNA :
    6 years ago

    How it is possible, can any one explain ?

  15. Fun Mania
    Fun Mania :
    6 years ago

    answer is wrong please correct it

  16. Gokila Dharani
    Gokila Dharani :
    6 years ago

    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.....

  17. Ajinkya Bhirad
    Ajinkya Bhirad :
    6 years ago

    Naacho

  18. Komal Deshmukh
    Komal Deshmukh :
    6 years ago

    how it is possible
    if %% will given two time it will print it two time their is no doubt .... answer is wrong

  19. RAJAT AGRAWAL
    RAJAT AGRAWAL :
    6 years ago

    Its wrong...how there can be % be two times...

  20. BHUMA SUBBA
    BHUMA SUBBA :
    6 years ago

    how

  21. Rekha.A It2015
    Rekha.A It2015 :
    6 years ago

    howw ????????

  22. Rekha.A It2015
    Rekha.A It2015 :
    6 years ago

    howw ????????

  23. Rekha.A It2015
    Rekha.A It2015 :
    6 years ago

    ?????????????????????? why

  24. Vivek Daniyal
    Vivek Daniyal :
    6 years ago

    plzzz explain??????????????????????? how

  25. Grigory Peter
    Grigory Peter :
    6 years ago

    how ?

  26. Tinkal Kalariya
    Tinkal Kalariya :
    7 years ago

    explain again

  27. Hemanth Tunuguntla
    Hemanth Tunuguntla :
    7 years ago

    If there are two backslash// symbols then they will be treated as specially and what's is the explanation of two percentage symbols

  28. Shrutika Dhumal
    Shrutika Dhumal :
    7 years ago

    how????

  29. Pankaj Rai
    Pankaj Rai :
    7 years ago

    Pls explain the concept of two percent symbol in printf

  30. Gourav Garg
    Gourav Garg :
    7 years ago

    printf("my salary was increased by 15%%!");
    why we use two percentage sign not one.
    plz explain.

  31. Manikandan Annamalai
    Manikandan Annamalai :
    7 years ago

    y 2 % is used?

  32. Vinela Reddy
    Vinela Reddy :
    7 years ago

    Y two % symbols are used?

  33. Shubham
    Shubham :
    8 years ago

    why this happend..?

  34. Abhijeet Chimankar
    Abhijeet Chimankar :
    8 years ago

    '%%' is used to produce '%' in output in print function.
    '!' doesn't have any effect on output. fyi only...

  35. Hemendra Kumar
    Hemendra Kumar :
    8 years ago

    printf("My salary was increased by 15%%!");
    this will print the required line.

Related Questions on C Fundamentals