Posts

Showing posts from June, 2021

Looping in C Programming Language

 Looping in C Programming Language Use: When we want to perform specific task repeatedly then we can use looping. In C Language there are three type of loop: For Loop While Loop Do while Loop Nested for Loop Each Loop statement requires three things: Initialization  Test Condition Increment/Decrement Operation 1. For Loop: For Loop is a repetition control structure which allow us to write a loop that is executed a specific number of time. Syntax:               for( initialization ; test condition; increment/decrement operation)                 {                    ------                    body of for loop;                    ------               } 2. While Loop: While Loop is use to per to p...

Looping in C Programming Language

 Looping in C Programming Language Use: When we want to perform specific task repeatedly then we can use looping. In C Language there are three type of loop: For Loop While Loop Do while Loop Nested for Loop Each Loop statement requires three things: Initialization  Test Condition Increment/Decrement Operation 1. For Loop: For Loop is a repetition control structure which allow us to write a loop that is executed a specific number of time. Syntax:               for( initialization ; test condition; increment/decrement operation)                 {                    ------                    body of for loop;                    ------               } 2. While Loop: While Loop is use to per to p...

Decision Making Statements in C Programming Language

Image
  Decision Making Statements in C Programming Language Decision making statement are use to take decision from condition. There are different decision making statement: If Statements Conditional Operator ? : Switch Case Statements Goto Statements 1). If Statements: If Statement is a conditional statements. It is use to take any decision. To take any decision, we apply one or more conditions. These conditions can be true or false. Example:               Student is pass or fail:               if (marks>=35)               {                         pass               }               {                              fail    ...

Input-Output Function in C Programming Language

  Input-Output Function in C Programming Language System defined/Built-in Function: A Function which is already defined by system not by user is called system defined functions. C Introduce different system defined functions like - Input-Output functions, Mathematical functions, String functions, Console related functions etc... Source code/Definition code of system defined function are in header file.   INPUT-OUTPUT FUNCTIONS: A function which is use to take input from user and display output or massage on console screen is known as input-output functions. Input Function: scanf(): scanf() is input function which is use to take input from user. getchar(): getchar() is a input function which is use to take single character from user. gets(): gets() is a in-built function which is use to take string from user. getc(): getc() is a input function which is use to take single character from user. Output Function: printf(): It is use to display message or value on console screen...

Operators in C Program

Image
  Operator in C Programming Language Operators is one of the TOKEN which is use to perform specific operations on different values/operands. Like arithmetic, relational, assignment etc... C Program support eight (8) operators: Arithmetic Operator Assignment Operator Relational Operator Conditional Operator Increment and Decrement Operator Logical Operator Bitwise Operator Special Symbol Operator 1. Arithmetic Operator:     Arithmetic operators are used to perform arithmetic operations like... +, -, *, /, % . Real Arithmetic: when we perform arithmetic operations on real numbers, answer will be in real number. Example: 12.5/6.5 =  1.9230 Mix Mode Arithmetic: When we perform arithmetic operations on those numbers in which some numbers are integer and some are real then answer will be floating number. Example: 12+3.5 = 15.5 2. Relational Operators: When we want to compare two operands or values, we use relational operators. Relational operator represent relation between...