Consider the following two definitions of main().
int main()
{
   /*  */
   return 0;
}
and
int main...
Share
For representing floating point numbers, we use float, double and long double.
What’s the difference ?
double has 2x more precision then float.
...
Share
printf:
printf function is used to print character stream of data on stdout console.
Syntax :
int printf(const char* str, ...);
Example :
// simple prin...
Share
A format specifier is a sequence formed by an initial percentage sign (%) indicates a format specifier, which is used to specify the type and format of the data to be...
Share
Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. You may assume tha...
Share
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...
Share
Predict the output of following C programs.
// PROGRAM 1
#include <stdio.h>
int main(void)
{
    int arr[] = {10, 20};
 &...
Share
sizeof()
Sizeof operator is a compile time unary operator which can be used to compute the size of its operand.
The result of sizeof is of unsigned integral type ...
Share
#define is a preprocessor directive. Things defined by #define are replaced by the preprocessor before compilation begins.
const variables are actual variables like...
Share
These are two important header files used in C programming. While “<stdio.h>” is header file for Standard Input Output, “<stdlib.h>&#...
Share