3,410 views

2 Answers

Best answer
2 votes
2 votes

Printf("%c",100);

Here %c is a format specifier which prints the ASCII equivalent of the value.

It will Print ASCII value of 100.

But ASCII is not mandated by C Language.

Hence,Option(D)None of these.

edited by
0 votes
0 votes

printf(“%c”, 100);

Prints ASCII value of 100

Option B


Extra stuff:-

printf(“%c”, '100');

Gives warning because 100 are three characters.


printf(“%c”, '1');

Prints 1


printf(“%c”, "1");

error (This is because single quotes are used for char literals, and double quotes are used for string literals)


printf(“%s”, 100);

error


printf(“%s”, '100');

error (This is because single quotes are used for char literals, and double quotes are used for string literals)


printf(“%s”, "100");

Prints 100


 

Answer:

Related questions

3 votes
3 votes
1 answer
1
go_editor asked Jul 5, 2016
1,367 views
_______ is not an E-Commerce applicationHouse bankingBuying stocksConducting an auctionEvaluating an employee
2 votes
2 votes
1 answer
2
go_editor asked Jul 5, 2016
3,842 views
Reliability of software is directly dependent onquality of the designnumber of errors presentsoftware engineers experienceuser requirement
2 votes
2 votes
1 answer
4
go_editor asked Jul 5, 2016
1,394 views
Which of the following logic families is well suited for high-speed operations?TTLECLMOSCMOS