User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:conio.h:cprintf

cprintf

int cprintf(const char *format[, argument, ...]);

description of cprintf

prints formatted output to the screen.

cprintf takes multiple arguments, applies to each of the format specifier contained in the format string, pointed to by
format, and prints the formatted data directly to the current text window on the screen. The number of available format
must match the number of arguments.

For more information on format specifiers, see printf format”.

Depending _directvideo of the global variable, the string is written either directly or through a BIOS call to screen memory.

To contrast to fprintf and printf, not translated cprintf line character (\ n) in the combination of characters carriage
return / line feed (\ r \ n). Tab character (specified with t \) are not expanded to spaces.

   Note: Do not use this function in any case in Win32 GUI applications.
#include <conio.h>
 
int main(void)
{
    clrscr();
    window(10, 10, 80, 25);
    cprintf("Hello world\r\n");
    getch();
    return 0;
}

output of cprintf c example

  Hello world

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/conio.h/cprintf.txt · Last modified: 2024/02/16 01:05 (external edit)

Impressum Datenschutz