Posts

What is C Programming Language?

Image
What is C Programming Language? Basics, Introduction and History What is C programming? C is a general-purpose programming language that is extremely popular, simple and flexible. It is machine-independent, structured programming language which is used extensively in various applications. C was the basics language to write everything from operating systems (Windows and many others) to complex programs like the Oracle database, Git, Python interpreter and more. It is said that 'C' is a god's programming language. One can say, C is a base for the programming. If you know 'C,' you can easily grasp the knowledge of the other programming languages that uses the concept of 'C' It is essential to have a background in computer memory mechanisms because it is an important aspect when dealing with the C programming language. IEEE-the best 10 top programming language in 2018

History of C language

Image
History of C language The base or father of programming languages is 'ALGOL.' It was first introduced in 1960. 'ALGOL' was used on a large basis in European countries. 'ALGOL' introduced the concept of structured programming to the developer community. In 1967, a new computer programming language was announced called as 'BCPL' which stands for Basic Combined Programming Language. BCPL was designed and developed by Martin Richards, especially for writing system software. This was the era of programming languages. Just after three years, in 1970 a new programming language called 'B' was introduced by Ken Thompson that contained multiple features of 'BCPL.' This programming language was created using UNIX operating system at AT&T and Bell Laboratories. Both the 'BCPL' and 'B' were system programming languages. In 1972, a great computer scientist Dennis Ritchie created a new programming language called

Loops in C

Image
How to use Loops in C In any programming language including C, loops are used to execute a set of statements repeatedly until a particular condition is satisfied. How it Works The below diagram depicts a loop execution, As per the above diagram, if the Test Condition is true, then the loop is executed, and if it is false then the execution breaks out of the loop. After the loop is successfully executed the execution again starts from the Loop entry and again checks for the Test condition, and this keeps on repeating. The sequence of statements to be executed is kept inside the curly braces { } known as the Loop body . After every execution of the loop body, condition is verified, and if it is found to be true the loop body is executed again. When the condition check returns false , the loop body is not executed, and execution breaks out of the loop. Types of Loop There are 3 types of Loop in C language, namely: while loop for loop do while loop while

Operator in C Programming Language

An operator is a symbol which operates on a value or a variable. For example: + is an operator to perform addition. C has wide range of operators to perform various operations. C Arithmetic Operators An arithmetic operator performs mathematical operations such as addition, subtraction and multiplication on numerical values (constants and variables). Operator Meaning of Operator + addition or unary plus - subtraction or unary minus * multiplication / division % remainder after division( modulo division) Example 1: Arithmetic Operators // C Program to demonstrate the working of arithmetic operators #include <stdio.h> int main () { int a = 9 , b = 4 , c ; c = a + b ; printf ( "a+b = %d \n" , c ); c = a - b ; printf ( "a-b = %d \n" , c ); c = a * b ; printf ( "a*b = %d \n" , c ); c = a / b ;

Goto Break and Continue Statement in C

Image
Goto Statement : The goto statement is used to alter the normal sequence of program execution by transferring control to some other part of the program unconditionally. Syntax : goto label; where the label is an identifier that is used to label the target statement to which the control is transferred. Control may be transferred to anywhere within the current function. The target statement must be labeled, and a colon must follow the label. Thus the target statement will appear as label:statement; Each labeled statement within the function must have a unique label, i.e., no two statement can have the same label. C – GOTO STATEMENT EXAMPLE PROGRAM : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include<stdio.h> #include<conio.h> void main () { int   number ; clrscr (); printf ( “ www . ” ); goto x ; y : printf ( “.com” ); goto z ; x : printf ( “c prog