how to use character for output?

Recommended Answers

All 4 Replies

Member Avatar for Rahul47

Be clear with your question.

printf("%c",x);

where x is any character variable which is defined like this :

char x;

hope it helps!! thanks.

With reference to ur query,
int main()
{
char ch='a';
clrscr();
printf("%c",ch);
getch();
return 0;
}
as u said use character for output.
here ch is a variable.
a is stored in ch variable.
ch is holding the result of a.
that variable is used as input for printing data on console.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.