menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
How can I print an int as a char in C?
Ask a Question
Questions
Unanswered
Tags
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 & Tech
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 & Tech
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 & Tech
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 & Tech
high-school
1
answer
1
vote
47.6k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
“What does it mean when we “rework” copyrighted material?”
Seven basic internal components found in a computer tower
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 Qamnty