Category: Learn C Online

if else in C programming 36

if else in C programming

Let us understand if-else statement in C programming language. if-else statement is a decision making statement used to execute certain set of statements based on the condition value. Syntax of if-else in C: if(condition){ /*1st block of statements*/ } else{ /*2nd block of statements*/ } Here, if and else are the keywords in C. The keyword if tells the compiler that what follows is decision control statement. The block of statements to be executed must be enclosed in opening and closing braces. If only one statement needs to be executed then braces need not be used. In if-else statement, condition...

if statement in C 23

if statement in C

In the if statement, if is the keyword in C. Syntax: if (condition is true){ /*block of statements to be executed*/ } The keyword if tells the compiler that what follows is decision control statement. The block of statements to be executed must be enclosed in opening and closing braces. If only one statement needs to be executed then braces need not be used. Let us understand if statement using an example. Example of if statement in C: int a = 10; if (a == 10){ printf(“You are in if block\n”); printf(“The value of a is %d\n”, a); } printf(“You...

Instructions in C 26

Instructions in C Programming Language

Understand C Instructions: Instructions in C are the commands in the program that will instruct C compiler to perform specific tasks or actions. Whenever we write a C instruction, we are telling C compiler to do a task for us. For example, if I want to instruct C compiler to perform multiplication of 2 numbers, I can do that with help of C Arithmetic instruction. Similarly, if I want to declare a variable, I should be able to do that using Type declaration instruction in C. In this article, I will explain 3 different types of C instructions. There are...

Rules for constructing variable names in C programming 33

Rules for constructing variables in C Language

The above video is an extract from the online course – “C Programming: The ultimate guide for beginners” which we are currently working on. Consider subscribing to Youtube channel – Aptuts in order to get latest updates on new videos and online C programming course. Variables in C are entities whose value keeps on changing throughout the program execution. As we all know, data is stored in the memory of the computer. Actually, data is not stored in the variable. A variable is the name given to the memory location. A variable name is an entity that points to a...

Constants in C | Rules for constructing constants in C 30

Rules for constructing Constants in C

The above video is an extract from the online course – “C Programming: The ultimate guide for beginners” which we are currently working on. Consider subscribing to Youtube channel – Aptuts in order to get latest updates on new videos and online C programming course. There are rules to be followed in order to create Constants in C. Let us discuss the rules to create constants. Rules for constructing Integer Constants in C1) An integer constant must have at least one digit.2) It must not have a decimal point.3) It can either be positive or negative.4) No commas or blanks...

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet