



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
THIS NOTES INCLUDES QUESTIONS WITH ANSWERS AND TOPIC INCLUDES OPERATORS IN C, DATATYPES SIZE AND RANGES,COMPILATION PROCESS IN C, ALGORITHM AND PSEUDOCODE, PROGRAM FOR IF- ELSE STATEMENT. MY NOTES ARE EASY TO UNDERSTAND AND IS REASONABLE WITH THE PRICE. CHECK IT OUT .
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!
An operator is a special symbol that tells the compiler to perform specific mathematical, logical, or relational operations. C language offers various types of operators used with variables and constants to create expressions^21. These operators are grouped into major categories: 22
● Arithmetic Operators: These perform mathematical calculations. 23
|---|---|---|
- ○ Example: For int a = 9, b = 3, c = 0; - ■ Multiply (*): c = a * b; (Result: 27) - ■ Divide (/): c = a / b; (Result: 3) - ■ Addition (+): c = a + b; (Result: 12) - ■ Subtraction (-): c = a - b; (Result: 6) - ■ Modulus (%): c = a % b; (Result: 0)
A data type tells you what kind of data value is stored in a variable^51. The data type of a variable is specified when it's declared and remains until the program finishes executing^52.
● Categories of Data Types:^53
○ Primary: int, char, float 54
○ Secondary: Structure, Array, Pointer 55
● Size and Range of Basic Data Types:^56
| unsigned int | 2 bytes | 0 to 65,535 | | int | 2 bytes | -32768 to 32767 | | Long int | 4 bytes | -2147483648 to 2147483647 | | Short int | 2 bytes | -32768 to 32767 | | Float | 4 bytes | 1.2E−38 to 3.4E+38 | | char | 1 byte | -128 to 127 | | unsigned char | 1 byte | 0 to 255 |
The compilation process involves several steps to transform your source code into an executable program: 57
A step-by-step procedure to solve a problem. 66
A high-level language. 67
Defines the logic and approach to a problem. 68
An independent representation of an algorithm. 69
It is independent of any programming language but resembles code. 70
It is described using natural language or structured steps, without being tied to any specific syntax of a programming language. 71
It helps in planning before coding by providing a structured outline. 72
It cannot be directly executed by a computer but can be easily translated into actual code. 73
● If you enter 20: Entered number is even ● If you enter 59: Entered number is odd