Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C GFacts C-Input and Output Quiz

What is return type of getchar(), fgetc() and getc() ?

In C, return type of getchar(), fgetc() and getc() is int (not char). So it is recommended to assign the returned values of these functions to an integer type variab...
C C-Input and Output Quiz C

Scansets in C

scanf family functions support scanset specifiers which are represented by %[]. Inside scanset, we can specify single character or range of characters. While processi...
C C-Input and Output Quiz C

What is use of %n in printf() ?

In C printf(), %n is a special format specifier which instead of printing something causes printf() to load the variable pointed by the corresponding argument with a...
C C-Input and Output Quiz c-puzzle

How to print % using printf()?

Asked by Tanuj Here is the standard prototype of printf function in C. int printf(const char *format, ...); The format string is composed of zero or more ...
C C-Input and Output Quiz c-input-output

What is the difference between printf, sprintf and fprintf?

printf: printf function is used to print character stream of data on stdout console. Syntax : int printf(const char* str, ...); Example : // simple prin...
C GFacts C-Input and Output Quiz

Return values of printf() and scanf() in C/C++

What values do the printf() and scanf() functions return ? printf() : It returns total number of Characters Printed, Or negative value if an output error or an e...
C C-Input and Output Quiz C

puts() vs printf() for printing a string

In C, given a string variable str, which of the following two should be preferred to print it to stdout? 1) puts(str); 2) printf(str); puts() can be preferre...
C C-Input and Output Quiz c-input-output

Use of fflush(stdin) in C

fflush() is typically used for output stream only. Its purpose is to clear (or flush) the output buffer and move the buffered data to console (in case of stdout) or d...
C C-Input and Output Quiz c-input-output

Difference between getc(), getchar(), getch() and getche()

All of these functions read a character from input and return an integer value. The integer is returned to accommodate a special value used to indicate failure. Th...
C C-Input and Output Quiz c-input-output

Interesting Facts in C Programming

Below are some interesting facts about C programming: 1) The case labels of a switch statement can occur inside if-else statements. #include <stdio.h> ...

Subscribe to Our Newsletter