C Programming

Structure in  C programming

Structure in C programming

A structure in C is defined as a collection of one or more variables possibly of different data types called heterogeneous types grouped together under a single name for convenient handling. Structure helps to organize complicated data, particularly in large programs as they permit a group of related variables to be treated as a unit…

String in C programming

String in C programming

A string in C programming can be defined as a group of characters or an array of characters i.e. a string is any valid variable name and is always declared as an array. The size determines the number of characters that are held by variable string_name. When the compiler assigns a character string to a…

Array in C programming

Array in C programming

An array in C can be defined as memory location under a single variable name i.e. we will define only one variable which is able to hold a finite consecutive memory location for storing all the elements and then we will refer to all the elements by means of a subscript or index variable one…

Loops in C

Loops in C

1. Need for Looping/Iteration Statements Loops in C programming language are used to repeatedly execute a line or a block of code until it obtains the value that the programmer desires. There are three types of loops in C programming: For Loop, While Loop, and Do While Loop. In C, loops can also be used…

If else in C (Conditional statements)

If else in C (Conditional statements)

In C, the if-else statement is used to carry out operations based on a set of conditions. If and only if the supplied condition is true, the operations stated in the if block is executed. In the C programming language, there are several different types of if statements. if condition If-else condition If else-if ladder…

Input/Output in C

Input/Output in C

Input/output in c establishes communication between user and program. Input statements are used to read necessary data for the program through a keyboard or through the data files created earlier. Output statements are used to display the message or result either on-screen or to data files or to print in a formatted manner. Unlike other…

C Programming Operators

C Programming Operators

Introduction C Programming Operators consist of Variables, Constants, or array elements. The operators could be of type integer, float, double, string, relational or logical. Relational and logical expressions return a Boolean (True or False) value while arithmetic expressions return either an integer expression, floating-point expression, or type double expression which is termed as an arithmetic…

C programming language – Introduction

C programming language – Introduction

History of C programming The C programming language was invented in 1972 by Dennis Ritchie, a system programmer at AT&T’s Bell Laboratories of the United States. It grew out of two previous languages, BCPL (Basic Combined Programming Language) by Martin Richards and Ken Thomson, and B language, which was also developed at Bell Laboratories. Applications…