answersLogoWhite

0

putchar used to write one character to output device Example putchar (variable_name); #include<stdio.h> void main() { char alpha='x'; clrscr(); putchar(alpha); putchar('\n'); /*or*/ putchar('\Y'); getch(); }

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you skip a line in C program?

putchar ('\n');


How do you print double quote sign in c?

putchar ('"'); puts ("""); etc


How will you print percent in c language?

putchar ('%'); puts ("%"); printf ("%%"); etc...


What loops does not need a counter?

Random example: while ((c= getchar()) != EOF) putchar (c);


How printf function is used within a C program and is different from putchar function?

1. use the help/manual 2. entirely different: put one character vs put string with formatted inserts


What is the printf in c?

Printf is a function which can output a "string literal," which means that unlike its similiar, putchar, it can in fact print entire sentences, including formatted data. Also, it's defined in stdio.h.


Input and output of turbo c?

input scanf() , getch() , getche() output printf() , putch() , putchar()


Functions except gets and puts in c?

printf , scanf , getchar, putchar, getc are the other operators in C except gets and puts..


What are the differences between puts and fputs?

All three functions output a single character, either to the console or to a FILE. putc() takes a character argument, and outputs it to the specified FILE. fputc() does exactly the same thing, and differs from putc() in implementation only. Most people use fputc(). putchar() writes the character to the console, and is the same as calling putc(c, stdout). puts() is a multicharacter function and putchar() is single character function


How do you print a string using putchar?

You would iterate over all characters within the string, printing each character with the putchar function. In C, strings are terminated with a null byte, so you'd stop when that null byte has been reached. Example: void printme(const char* me) { while (*me) { putchar(*me++); } } Needless to say this method is inefficient compared to using API that outputs the entire string at once, but the general approach of iterating over all characters in a string is used frequently.


How do you print on console without using printf or puts in c language?

write, putchar, putc, fputc etc


How do you convert binary to decimal using c?

static void tobin_core (int n) { if (n&gt;1) tobin_core (n/2); putchar ('0'+n%2); } void tobin (int n) { if (n&lt;0) { putchar ('-'); n= -n; } tobin_core (n); }