Standard C library provides qsort function that can be used for sorting an array. Following is the prototype of qsort() function. // Sort an array of any type.
An array is collection of items stored at continuous memory locations. Why do we need arrays? We can use normal variables (v1, v2, v3, ..) when we have small nu
Loader is the program of the operating system which loads the executable from the disk into the primary memory(RAM) for execution. It allocates the memory space
A Fractal is a never-ending pattern. Fractals are infinitely complex patterns that are self-similar across different scales. They are created by repeating a sim
Assertions are statements used to test assumptions made by programmer. For example, we may use assertion to check if pointer returned by malloc() is NULL or not
Error is an illegal operation performed by the user which results in abnormal working of the program. Programming errors often remain undetected until the progr
The C/C++ incompatibilities that cause most real problems are not subtle. Most are easily caught by compilers. This section gives examples of C code that is not
C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. It was developed by Microsoft led by Anders Hejlsberg and
fseek() is used to move file pointer associated with a given file to a specific position. Syntax: int fseek(FILE *pointer, long int offset, int position) pointe
As already known character known character range is between -128 to 127 or 0 to 255. This point has to be kept in mind while doing character arithmetic. To unde
rand () rand() function is used in C to generate random numbers. If we generate a sequence of random number with rand() function, it will create the same sequen
In C, following 6 operators are bitwise operators (work at bit-level) & (bitwise AND) Takes two numbers as operands and does AND on every bit of two numbers. Th
In C and C++, comma (,) can be used in two contexts: 1) Comma as an operator: The comma operator (represented by the token ,) is a binary operator that evaluate
The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere
Break Statement is a loop control statement which is used to terminate the loop. As soon as the break statement is encountered from within a loop, the loop iter
strcmp() is a built-in library function and is declared in <string.h> header file. This function takes two strings as arguments and compare these two strings le
strcpy() is a standard library function in C/C++ and is used to copy one string to another. In C it is present in string.h header file and in C++ it is present
Continue is also a loop control statement just like the break statement. continue statement is opposite to that of break statement, instead of terminating the l
There are different ways in which parameter data can be passed into and out of methods and functions. Let us assume that a function B() is called from another f
Given two numbers base and exponent, pow() function finds x raised to the power of y i.e. xy Syntax: double pow(double x, double y); x : floating point base val
A void pointer is a pointer that has no associated data type with it. A void pointer can hold address of any type and can be typcasted to any type. int a = 10;
While writing a program, sometimes we give comment about the working of the code in the comment section with the help of single/double comment line. But we had
A token is the smallest element of a program that is meaningful to the compiler. Tokens can be classified as follows: Keywords Identifiers Constants Strings Spe
C/C++ Preprocessor directives basics Preprocessor directives: In almost every program we come across in C/C++, we see a few lines at the top of the program prec
strftime() is a function in C which is used to format date and time. It comes under the header file time.h, which also contains a structure named struct tm whic