Skip to content

C Language Basics

  • Home
  • Learn
  • C Program Examples
  • Need Help?

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 […]

No CommentsRead More "Recommended C/C++ Programming Language Books"

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= […]

No CommentsRead More "Factorial 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, […]

3 CommentsRead More "Binary Search Program in C"

Prime Number Program in C – C Program for Prime Number

Prime number program in c along with the output is given below. About Prime Numbers Any natural number like 1, 2, 3, etc. is called a prime or a prime number if it is greater than 1 and can only be divided by 1 and the number itself. For example, 2, 3, 5, 7, 11, […]

2 CommentsRead More "Prime Number Program in C – C Program for Prime Number"

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 […]

No CommentsRead More "C Switch Case: C Switch Case Syntax & Switch Case Example"

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 […]

5 CommentsRead More "C if Statement, If Else Statement & Else If Statement"

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 […]

No CommentsRead More "C Global Variables & C Local Variables: C Variable Scope"

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 […]

No CommentsRead More "C Bitwise Operators"

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 […]

4 CommentsRead More "C Storage Class Specifiers – auto, register & extern"

Posts Navigation

  • Page 1
  • Page 2
  • Next page

© 2019 C Language Basics. All rights reserved. Privacy Policy

 

Loading Comments...