Recommended C/C++ Programming Language Books

Recommended C/C++ Programming Language Books

Head First C: A Brain Friendly Guide by David Griffiths, Dawn Griffiths Head First C is for anyone new to C, and primarily for college students who are building their first C projects as the book not only teaches C concepts, but, also shows how to program Arduino. There are lot of practical examples present in this book.   Buy… Read more →

Factorial Program in C

Factorial Program in C

Factorial program in c using function and recursion with the output is given below. About Factorial The factorial of a non negative integer, n, is the product of all positive integers less than or equal to n. It is denoted by n!. Also, the value of 0! is 1. For example, 3!=3*2*1=6 Recursively, factorial can be defined as, n! =… Read more →

Binary Search Program in C

Binary Search Program in C

Binary search program in c using function and without using function is given below with the output. About Binary Search Binary search is a divide and conquer search algorithm used primarily to find out the position of a specified value within an array. It should be noted that, for binary search to operate on arrays, the array must be sorted… Read more →

C Switch Case: C Switch Case Syntax & Switch Case Example

C Switch Case: C Switch Case Syntax & Switch Case Example

C switch case is a multiple branch selection statement in which the value of an expression is checked against a list of integers or character constants. C switch case can be used to perform one of the several possible action depending of the evaluated value of a logical expression or character or integer constant. C Switch Case Syntax switch(expression) {… Read more →

C if Statement, If Else Statement & Else If Statement

C if statement, if else statement and else if statement enable programmers to selectively execute certain statements, thus, adding decision making capability to the c language. if Statement The general form of if statement is given below: if(condition) { statement_1; statement_2; . . . statement_n; } Above, condition is any valid logical or relational condition and statement_1, statement_2, …., statement_n… Read more →

C Global Variables & C Local Variables: C Variable Scope

By the scope of variables in c, we mean that from which parts of the program any particular variable could be accessed. Thus, depending on the scope of variables in c language, variables could be classified as follows: Global Variables Global variables in c have their declaration outside the function definition of all functions used with in the program and… Read more →

C Bitwise Operators

C bitwise operators allows manipulation of data at bit level. It should also be noted that these operators cannot be applied on floating point numbers. Available C bitwise operators are as follows: Bitwise AND Operator (&) When two values are operated by bitwise & operator, the binary representation of both values are compared bit by bit. If each corresponding bit… Read more →

Introduction to Programming: Machine Language, Assembly Language and High Level Language

Introduction to Programming As we know that a computer cannot perform any task of its own and can only understand its own language which is the language of 0s and 1s i.e. binary number system, therefore a computer user has to communicate with a computer using the language which they can understand. Thus, the set of instructions to perform a… Read more →

C Storage Class Specifiers – auto, register & extern

C storage class specifiers determines the physical location in memory within the computer where the variable declared in c would be actually stored. Storage class specifiers also determines The initial value of the variable, if an initial value is not assigned. The life of a variable. The scope of the variable. Available c storage class specifiers in the c programming… Read more →