Category Archives: C Tutorials

Solve error: lvalue required as left operand of assignment

In this tutorial you will know about one of the most occurred error in C and C++ programming, i.e. lvalue required as left operand of assignment. lvalue means left side value. Particularly it is left side value of an assignment operator. rvalue means right side value. Particularly it is right side value or expression of an assignment… Read More »

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… 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 »