Comma in C and C++
In C and C++, comma (, ) can be used in two contexts:
1. Comma as an operator:
The comma operator (represented by the token, ) is a binary operator that evaluates its first operand and discards the result, it then evaluates the second operand and returns this value (and type). The comma operator has the lowest precedence of any C operator, and acts
2. 2) Comma as a separator:
Comma acts as a separator when used with function calls and definitions, function like macros, variable declarations, enum declarations, and similar constructs.
3. 3) Comma operator in place of a semicolon.
We know that in C and C++, every statement is terminated with a semicolon but comma operator also used to terminate the statement after satisfying the following rules.
The variable declaration statements must be terminated with semicolon.
The statements after declaration statement can be terminated by comma operator.
The last statement of the program must be terminated by semicolon.
C Programming & Data Structures: Comma Operator in C Topics discussed:
1. What is the Comma Operator?
2. Use of Comma Operator as the separator.
3. Use of Comma Operator as an operator.
4. Precedence of Comma Operator.
5. Examples based on Comma Operator.
6. Homework on Comma Operator.
How To Install Turbo C For Window 10 Full Screen - • How To Install Turbo C For Window 10 Full ...
Introduction to C Language Programming- • Introduction to C Language Programming
How to Save, Compile & Run C_Program in Turbo C++ || Create File Turbo C++ || (Hindi)- • How to Save, Compile & Run C_Program in Tu...
Printf and scanf Function Working Process
• Printf And Clrscr Function of C Language I...
C Programming Header Files
• Header File In of C Programming In Hindi W...
printf and scanf function
• What Is The PrintF and Scanf Function In C...
Comments in C Language
• Comment In C language || Type of C language
Value initialization at compile time and run time
• Value initialization to variable at run ti...
Operators in c language
• Operators in C, C++, C#, Java and Python L...
Arithmetic operator in c language
• Arithmetic operator perform operation betw...
Arithmetic Assignment operator
• An assignment operator is used for assigni...
Unary Operator in C language
• Unary operator use to perform operation on...
Bitwise operator
• mathematical operation like addition, subt...
C Programming Language Full Course Topics Features of C
#Addresses in C
#Pointers in c
#Array pointer
#Structures
#Struct pointers
#Typedef in c
#C Preprocessor
#Preprocessor directives
#File Input/Output
#Opening files
#Reading and writing file functions
#Using memmove in array
#about c language
#system programming
#Features of C language
#Definition and declaration.
#Initialization.
#Indirection operator.
#Address of operator.
#Pointer arithmetic.
#Dynamic memory allocation.
#Arrays and pointers.
#Function and pointers.
#My First C program
#Compile and Run C program
#C Syntax Rules
#Keywords and Identifier
#Data Types in C
#Variables in C
#Operators in C Language
#C Input / Output
#Decision Making
#if
#if else statement
#Switch Statement
#Looping
#Arrays
#string and character array
#Storage classes
#Functions in C
#Addresses in C
#Pointers in c
#Array pointer
#Structures ??
#Struct pointers
#Typedef in c ??
#C Preprocessor
#Preprocessor directives
#File Input/Output ??
#Opening files
#Reading and writing file functions
#Using memmove in array
#Introduction to Functions
#Types of Functions and Recursion
#Types of Function calls
#Passing Array to function
#Structures in C
#All about Structures
#Typedef
#Unions
#Pointers in C
#Pointers concept
#Declaring and initializing pointer
#Pointer to Pointer
#Pointer to Array
#Pointer to Structure
#Pointer Arithmetic
#Pointer with Functions
#Advanced Topics in C
#File Input / Output
#Error Handling
#Dynamic memory allocation
#Command line argument
#graphics in c language
------------ Support me By ( Free) -----------------
LIKE | COMMENT | SHARE | SUBSCRIBE