Bitwise Operators Bitwise operator works on bits and perform bit-by-bit operation. The truth tables for &, |, and ^ is as follows − p q p & q p |…
Category: B.Tech./1Sem/Computer System and Programming in C
Use of while
How to use while loop? A while loop in C programming repeatedly executes a target statement as long as a given condition is true. Syntax The syntax of a while loop in C programming…
Program loops and iterations
How to Loops and Iterations? Programming languages provide various control structures that allow for more complicated execution paths. A loop statement allows us to execute a statement or group of…
Nesting if and else
How to use Nested if and else? It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if…
Conditional program execution
Need For Conditional program execution: Decision making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or…
Functions with array
Passing Arrays as Function Arguments in C If you want to pass a single-dimension array as an argument in a function, you would have to declare a formal parameter in…
Array notation and representation
Array notation and representation All arrays consist of contiguous memory locations. The lowest address corresponds to the first element and the highest address to the last element. Declaring Arrays To…
Arrays
Introduction to Arrays An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. Instead of declaring…
Writing and Executing the first C program
Following is first program in C #include <stdio.h> int main(void) { printf(“Hello World”); return 0; } Let us analyze the program line by line. Line 1: [ #include <stdio.h> ] In…
Structure of C program
C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating…