QBS
QBS
#include <stdio.h>
int main()
return 0;
Bitwise OR (|)
#include <stdio.h>
int main()
char ch;
scanf("%c", &ch);
else
return 0;
#include <stdio.h>
int main() {
int a, b, c;
if (a >= b) {
if (a >= c) {
} else {
} else {
if (b >= c) {
} else {
return 0;
Start
If a is greater than or equal to b and a is greater than or equal to c, then a is the largest.
Else if b is greater than or equal to a and b is greater than or equal to c, then b is the largest.
End
FLOW CHART
Token
Token is a The smallest unit of a programming language.in c token Includes Keyword, identifiers,
constants , operators , string
Identifiers
An identifier is a name used to identify a variable, function, array, or any other user-defined item in a
program. Identifiers are used to represent memory locations where data is stored or to call specific
functions.
Q keyword in c
Variable
A variable is a way to store information that you can use and change later in your program.
A variable name must start with an alphabet or an underscore only. It cannot start with a digit.
INCREMENNT operator
DECREMENT operator
Formatted Input in C
Formatted input in C refers to reading data from the user in a specific format using the scanf()
function. This allows you to control the type, number, and format of the input you want to receive.
scanf() Function:
It takes a format specifier to define the type and structure of the input.
Example
#include <stdio.h>
int main() {
int age;
scanf("%d", &age);
return 0;
}
Formatted Output in C
Formatted output in C refers to displaying data in a specific format using the printf() function. This
allows you to control how the output is displayed.
printf() Function:
It also uses format specifiers to control how the data should be printed.
Example
#include <stdio.h>
int main() {
return 0;
Arithmetic Operators in C
1. Addition (+):
3. Multiplication (*):
4. Division (/):
o Example: a / b divides a by b.
o Note: In integer division, the result is truncated (i.e., the decimal part is discarded).
5. Modulus (%):
o Returns the remainder of the division of the left operand by the right operand.
#include <stdio.h>
int main() {
int a = 10, b = 5;
return 0;
Logical Operators in C
Logical operators are used to perform logical operations on expressions that evaluate to true or false.
They are typically used to combine multiple conditions in control flow statements (like if, while, etc.).
o If the operand is true, it returns false; if the operand is false, it returns true.
#include <stdio.h>
int main() {
int a = 1, b = 0;
return 0;