Category Archives: C Tutorials

Lexical Analyzer in C and C++

Here you will get program to implement lexical analyzer in C and C++. Compiler is responsible for converting high level language in machine language. There are several phases involved in this and lexical analysis is the first phase. Lexical analyzer reads the characters from source code and convert it into tokens. Different tokens or lexemes… Read More »

How to Generate Random Number in C and C++?

Here you will get program and learn how to generate random number in C and C++. We can use rand() function to generate random number. It is defined in stdlib.h header file. It generates a random number between 0 and RAND_MAX (both inclusive). Here RAND_MAX is a constant whose value depends upon the compiler you are… Read More »

Format Specifiers in C

In this article you will get list of format specifiers in C. Format specifier is used to specify the data type while reading or writing. For example if you want to print value of an integer type variable then you have to use %d in printf() function. Take below example.   As you can see… Read More »

Dangling Pointer in C

Here you will learn about dangling reference and dangling pointer in C. In computer programming, memory is allocated for holding data object. After the work is done the memory is deallocated so that this memory can be used to store any other data object. Also Read: void pointer in C What is Dangling Pointer? While programming,… Read More »

Difference Between break and continue in C

In this tutorial you will learn about difference between break and continue in C. The break statement is used in switch or loops and continue statement is used only in loops. When break statement is encountered it immediately stops the switch or loop execution. When continue statement is encountered, all the statements next to it are skipped… Read More »

Difference between C and C++ in Tabular Form

In this tutorial you will learn about difference between C and C++ language i.e. C vs. C++. It is one of the most commonly asked question in technical interviews. C programming language was developed by Dennis Ritchie in the year 1972 while C++ programming language was developed by Bjarne Stroustrup in the year 1983. C++… Read More »