menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
How can I print an int as a char in C?
asked
Jul 16, 2019
141k
views
1
vote
How can I print an int as a char in C?
Computers and Technology
college
Gerson Dantas
asked
by
Gerson Dantas
8.1k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
0
votes
Use a char format specifier instead of an integer format specifier. C will automatically print the integer as a character, e.g. 97 will print as 'a'.
Clarus Dignus
answered
Jul 18, 2019
by
Clarus Dignus
8.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
3
votes
Convert it to a char and print it
Peng
answered
Jul 20, 2019
by
Peng
7.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Dec 12, 2024
227k
views
Char *chars; chars = malloc(11 * sizeof(char)); for (int j = 0; j < 11; j++) { chars[j] = helloworld[j]; } can you modify this to make the function print elwrd?
Mchl
asked
Dec 12, 2024
by
Mchl
7.9k
points
Computers and Technology
high-school
1
answer
1
vote
227k
views
asked
Jul 20, 2024
94.4k
views
For the code below, which combination of for-loop parameters will print characters "fd" char[] letters = {'a','b','c','d','e','f'}; for (int i = INIT; i > THRESH; i = i+INCR) {print(letters[i]);}
Kokosing
asked
Jul 20, 2024
by
Kokosing
9.3k
points
Computers and Technology
high-school
1
answer
1
vote
94.4k
views
asked
Jun 7, 2020
47.6k
views
What will this method call print? public void patternGrid(int rows, int columns, char symbol) { for(int m = 0; m < rows; m++) { for(int n = 0; n < columns; n++) { System.out.print(symbol); } System.out.println(); } } patternGrid(3,4,'#');
Jim Rush
asked
Jun 7, 2020
by
Jim Rush
8.8k
points
Computers and Technology
high-school
1
answer
1
vote
47.6k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org