C is a procedure-oriented programming language developed by Dennis Ritchie in 1972, used to develop system software (like operating systems) and application software. The exam pattern consists of Part A (12 questions, answer any 8 for 32 marks) and Part B (4 questions from each unit with internal choice for 48 marks). Key topics include: data types (integers, floats, characters) that decide data nature and memory allocation; type conversion (implicit automatic, explicit manual with potential data loss); operators (arithmetic, relational, logical, assignment, conditional, special); algorithms as step-by-step processes; and flowcharts as graphical representations using symbols like ovals (start/stop), parallelograms (input/output), rectangles (process), and rhombuses (decision making).
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Unit-1 B.Sc Semester-I Backlog | Programming in C | Important Questions | Last Minute Revision
Added:Hello everyone welcome for the CR last minute revision for C programming language done this is for BC students and the examination is on 29th January 2026 examination is on 29th January 2026 and our subject is what year programming in C before starting to this important questions Right? We will try to understand what is the question paper pattern. The question paper pattern is divided into two parts. In the part A you have 12 questions out of which you need to write any four. In part A you will have 12 questions and out of which you need to write any eight. 8 into 4 gives you 32 marks. 8 into 4 gives you 32 marks. How many questions will be given in part A? Here you have 12 questions. So you have a choice of leaving four questions. And in the part B you'll have questions from each unit. Here you have internal choice. You have four questions 13 14 15 16 and you need to answer all four. But you have internal choice. Either you can attempt 13 A or 13 B. 14 A or 14 B. 15 A or 15 B, 16 A or 16 B. and 4 into 12 gives you 48 marks. Please do not do this simple mistake writing the answer from 15 A and 15 B. Then this is considered as extra. When you write two questions from the same question, it is considered as extra and they choose which gets the highest marks that will be chosen. Okay. So you have two parts in the part A. You have 12 questions.
You need to answer any eight short answer questions. And then we have long answers four and out of four you need to attempt all the four done here. Let us jump into the syllabus now. Okay. And again please understand here we are not going to discuss the entire syllabus.
Here we are going to discuss only the important concepts which are previously asked and which has the highest priority done. So that we are going to see the same questions in the upcoming semester examinations done here and we are not going to discuss entire syllabus even. So what are the basic things required for that question? I will be giving you that particular knowledge only. Okay. So in the unit one we start with programming and fundamentals and basics of C programming. So let us try to understand what is a program. Let us try to understand why we need to write programs done here and then we will understand what is C and what are the different types of computer languages we have and what is translators and what is the purpose of using translators done types of software algorithms and flowcharts structure of C programming quite an important thing and operators and expressions done see a program is considered as set of instructions which perform a particular task. What is a program? Program is considered as set of instructions which performs a particular task. So when you want to give a command to this machine, when I want to give a command to this machine done here, it is not possible for me to directly do that. So to do that task on this computer, I take the help of a software and that software is developed by writing programs.
Software is developed by writing programs. And what is software? Software is set of programs again which performs a particular task. What is software?
Software set of programs which perform a particular task. So when you want to develop a software, you need to write programs. And the biggest problem is computer will not understand your language. Computer will never understand English. Computer understands only two things. What are they? 0 1 we call it as binary language we call it as machine level language we call it as lowlevel language done computer understands only two things in this universe 0 1 now as a human being I understand English right but we have the ASI codes American standard code for information interchange when you understand the ASI code you can convert highle language to lowle highle is what I understand what you understand English. Low level is what machine understands that is ones and zeros. Now you write instructions in English. High level computer understands only low-level ones and zeros. Now who is helping you to translate this high level to low-level we have translators.
We have basically three types of translators here. Compiler, assembler and interpreter. compiler, assembler and interpreter. Okay. So, compiler will take the entire code at a once and it will be converted into ones and zeros.
Compiler will take the entire code at a once and it will be converted into ones and zeros. This is translation of highle language to low level. And why should you do this? Because you don't know ones and zeros. Computer don't know English.
Machine understands only ones and zeros.
human understand English. So for conversion of this highle language to low-level we take the help of the translators right and compiler is one of the best translator which is used by C, C++ and Java right and when it comes to the interpreter line by line execution will take place done here interpreter execution happens line by line. Python programming language, R language are the best examples of interpreted programming languages. Okay. Again, Java uses compiler and as well as interpreter to fasten the process. Moreover, precisely compiler uh Java is considered as compiled programming language and it uses a compiler called as JIT just in time. Okay. The C programming language what you are going to see in the first semester uses compiler which translates highle language to low-level language.
Okay. As a user I am writing programs.
My programs are in English. That English is converted into ones and zeros. Now which highle language you are using?
Because you can't write anything as you wish. There should be some rules and regulations which need to be followed.
Those rules and declarations are given by C programming language.
Kindly make a note C is a procedure oriented programming language. C is a procedure oriented programming language which is used to develop system software and application software.
Which is used to develop system software and application software. So we have two types of softwares here. What are they?
System software done. And next one is what nana application software.
Okay. Coming to the system software. The best example of system software is OS operating system. Then the operating systems what we use in our mobile phone is Android operating system.
Operating systems are considered as system softwares and the best example of operating system which is developed by writing C programs is Unix. We also go with Linux or Linux. Unix is an operating system which is purely developed by writing C programs. The best real world example of C programming language is Unix operating system. As I said in my definition, C is a procedure oriented programming language which is used to develop system software and application software. The best example of system software is operating system.
Unix is the real world operating system which is existing which is developed by writing C programs. C closely works with Unix. And coming to the application software, this special purpose softwares which makes your data access efficient and effective. It is application software. Like see we have Facebook.
Usually Facebook is what? It is a social networking site but I have a application installed in my mobile phone so that I can effectively use my data. I need not to log in every time. Even the application is closed. It is running behind the screens. If someone pings a message, I get a notification. My data access is becoming so efficient. I can talk to the students through the online.
Then we are using an application for it.
I'm just displaying my notes here. I'm writing content here. I'm using an application. Applications are special purpose softwares which makes our life simple, which makes our data access efficient and effective. Now these two things are developed by writing C programs. These two things are developed by writing C programs. Okay, let us have a quick recall. We started with what?
What is program? Programs are set of instructions which perform a particular task. Why we need to write programs?
Because I want to give the instructions to the machine. Machine will not understand English. Machine understands only ones and zeros. So how will you communicate with the machine? Write programs, right? Write C programs.
Done. Write Java programs so that you can write instructions in your own language that is highle language, English that will be translated into low-level language that is machine level language, binary language, ones and zeros. And for this purpose I'm using translators. We have compiler, assembler, interpreter.
Okay. And what is the purpose of writing programs? You give the instructions to the machine. Very good. When you give the instructions to the machine, machine does what? It will develop system software or application software. And for this purpose, we are using C programming language. What is C? C is a procedure oriented programming language which is used to develop system software and application software. System software the best example is operating system and Unix is an operating system which is closely worked with the C programming language. Application softwares any specific purpose softwares done here which allows you to efficiently effectively access the data.
It is called as your application software types of softwares. Okay.
Now let us go with some of the important questions which is previously asked.
Done here. See these question describe different data types with examples. It has been asked twice in the last two years. Done. And in the December January of 23 24 that is in the previous academic year and here we have this question for 12 marks. So what do you mean by a data type? Data type decides the nature of your data. Data type allocates the memory to your variable.
Right? What is the data type? Data type decides the nature of your data. What are you going to store into your variable? and the size for the bytes number of bytes memory will be allocated to that variable based upon the data type. Okay. So when it comes to the data type where do we use it very exclusively in the declaration of variables in the declaration of constants we take the help of data types. Okay. So we have different types of data types dear which are listed down here. integer types, floating types, character types and precisely we call them as primitive data types, primary data types. The secondary data types are which are going to come in the next coming chapters like arrays, structures, strings, unions here those are called as secondary data types.
Derived data types you also turn them as what? Derived data types and see derived data types are not new data types. They are primary data types with additional rules and regulations. Those are called as secondary data types are derival data types. See in the primary data type I have a character collection of this characters group of characters will make you a string. That is what we call as character array. If I place integer float to character in a single place then it is called as what? Structure.
structure is a collection of heterogeneous data elements that is your secondary data type. Apart from this we also have userdefined data types empty data types and pointers which we are going to see in the next coming chapters. Okay. So for this particular question you remember this basic things this gives you the good marks. integer data types when you are dealing with a whole number like the role number of a student. Okay? Because your role number is not something like 7.89 3.24. No, your role number is a perfect whole number. Don't you? 55, 23, 44. In such cases, we need to take integer times.
The pin code of your city, it consists of six-digit whole number, complete number. Okay? So when you are dealing with numbers which are complete which are whole whole numbers right please use integer data type. If you're dealing with real numbers, the numbers which comes with the fractional part, the numbers which comes with the fractional part, then we have to use what [clears throat] floating point values like the value of a pi 3.14. The value of a pi 3.14 that is floating data type average of a student cgpa of a student 8.9 10.0 6.4 4 done that that things can be considered as what your floating point values. If you deal with anything like my height 5.6 5.7 done and your height 6.1 6.22 that is float again when you see the online applications your height is not asked in this 5.2 25.3 it is asked in centm 167 cm 170 cm right that 167 170 is what whole number that is integer. So based upon your situation based upon the client requirement if you want to deal the height in the form of points feet take float. If you want to deal the height in the form of cm as a whole number take integer. When I go to bank, my bank account number is integer.
But my bank balance is float. Right?
When I go to a class, my role number is integer. Whole number. My average is what? Floating point value. Then that is a real number. So based upon this requirement and purpose, you need to deal with integers or you need to deal with float. And when you are dealing with a single character, we have to take a character data type. When you are dealing with a single character like gender of a person, M is for male, F is for female. Grade of a student, A B C.
Section of a student, A section, B section, no A B. When you are dealing with a single alphabet, please take the data type as character.
Right? Hopefully you got the knowledge about data types when to use, where to use. When you are dealing with whole numbers, complete numbers, take integers. When you are dealing with the fractional values, real numbers, take float. When you are dealing with a single alphabet, please take characters.
And one another thing is characters always should be written inside the single quotation marks. character should be always enclosed in the single quotes and inside the single quotes you write anything it may be a number it may be a symbol compiler treats it as compiler treats it as character only anything you write in the single quote if I write single quote five now five is not number the nature of that number is changed to character because I said in the definition data type decides the nature of your data in This single quote if you fi take five now five is not a number.
Five is what? Character because it is enclosed in single quotation marks and it is taken with the data type of character. Okay.
Integers are again divided into three simple things. Int long. Okay. Int long. And again this int short long can also be taken as unsigned int signed int unsigned short signed short unsigned signed. Okay. So let us see first what is the difference between the short and int has a range of - 32,768 to plus 32,767.
So when you are dealing with a smaller range of numbers like the marks of a student. Okay, please take short end when you are dealing with a bigger numbers like a pin code of a student take what int i d because integer occupies four bytes of memory short occupies only two bytes of memory. So when you are dealing with a smaller range values please work on short you are not wasting your memory you are taking only two. When you are working with the bigger numbers take int which occupies how many bytes?
four bytes because you have to remember this basic logic. As the memory increases, your processing speed decreases. As the memory increases, processing speed decreases. So based upon the requirement, you have to take short, int.
And again unsigned short and sined short. So when you want to deal only with positive numbers take unsigned shot and the range goes to 0 to 6535.
Range goes to 0 to 6535.
That is unsigned short. We deal only with positive numbers. I want to deal with both positive and negative numbers.
Take what? Signed short. Take what?
Signed short. So you deal with only sorry both positive and negative numbers. Unsigned deals only with positive numbers. Okay. Unsigned short only positive range is 0 to 6535.
Signed short both positive and negative range is - 32,7682 + 32,767.
Memory increases processing speed decreases. So when you are dealing with small values take short. When you are dealing with bigger values take int.
When you are dealing with quite bigger values take long. Example when you're dealing with role number of a student which consists of three digits or four digits take short. When you are dealing with the role number of a student which has 10 digits take long. Take long.
Done. When you are dealing with marks of a student, short 1,000 marks maximum short. 100 marks maximum short. Age of a person short. When you are dealing with pin code of a person six-digit number, no pin code 500 21347, then take what? Int. Okay. And when you are dealing with fractional values like percentage of a student, average of a student, right? Take float.
int, float, character are data types.
They are keywords. How many keywords we have in C language? 32 keywords we have in C language. And this is declaration and initialization of a variable integer I= 10 float f= 10.5 character C= C. So in this examples int float character are data types I f c are identifiers variable names equal to is assignment operator 10 10.5 a are called as lit values given to your variables lit semicolon is what termination the most famous rule of C language each and every statement need to be terminated ated by a semicolon. Done here. So you are just printing them. How do you print? Print of output statement. Whatever you write in the double quotes, it is printed as it is. But when you write percentage D, it is character string. It is format specify here. For this, we need to give a reference. And here reference is not given as a single variable. Reference is given as size of I. Now size of decide is what here it's a special operator.
Size off is what? It's a special operator which displays a integer value to the user. What will be the result of size of how many bytes of memory is occupied by 8. Again you remember what did I say about data type? It decides the nature of your data and it decides how many bytes of memory is allocated to your variable. Second one, how many bytes is allocated is displayed to you with the help of size of. So when you write size of I, I get the output as four bytes is allocated to integer. When you use size of F, it allocates four bytes to the floating point. When I write size of C, it allocates one byte to the character. Done. These are data types in the C programming language and a program for the data types in C programming language. Done. Data types gives you what? Nature of your data and memory occupied by your variable. We have primarily integer, float, character. Integer is again divided into short, int, long, float deals with fractional values. Character single alphabet which is written in the single quotes. Good.
This will be the output right on a brief types of data types integer floating characters whole numbers are stored into the integer floating values stores what fractional values character stores what your single alphabet as I said you write a 9 r hash it may be anything which is written in the single code it is considered as what a character data type.
After this one another important question which is asked in December 2024 what is type conversion? So we have seen data types like integer float to character. No now you can convert one data type into another data type that is called as type conversion. And here we have implicit type conversion, explicit type conversion. Implicit type conversion or dear it is automatic. When you are trying to store a smaller data type into the larger data type, it is automatically converted. But when I want to store the larger data type into smaller data type, I need to do automatic. Sorry, I need to do manually.
And we call it as explicit type casting, explicit type conversion. Like integer and float, integer is a smaller data type, float is a bigger data type. So storing integer into float is not a risk. Storing integer into float is automatic. Whereas float is a bigger data type, integer smaller data type.
When you want to store this bigger data type into smaller, when you want to store float into integer, we need to do it manually. And that is called as explicit type conversion.
So we have type conversions implicit and explicit. Implicit is automatic.
Explicit is manual. We have to forcefully do it.
Implicit is done by the compiler because it is automatic. Explicit is done by the programmer user. I have to do it and I'll show you how to do that. And in the implicit type conversion automatic we don't lose any data. So when you store 10 into float 10 is converted as 10.0 because 10 is what integer whole number I'm storing into float. Float is what fractional value. 10 is stored as 10.0.
Whereas explicit type conversion there may be a data loss because I am trying to store float into integer. Float is fractional 3.14 whereas integer is what a whole number.
I can't store 3.14. I can store only three. I can store only three because integer deals only with whole numbers.
When I have 3.14 and when I want to store an integer that.14 is lost. That's why we say data loss is possible in the explicit type conversion.
when I want to do this like integer plus four float no issue if integer value is taken as 10 float value is 5.5 when I add them it becomes what dear 10.5 it directly stores the result as 1550 right when you have 10 in the uh integer 5.5 in the float and when I do this addition of integer with float integer is automatically converted into float and you have 15.0 but when I want to do this manual conversion that is explicit conversion look at the floating value it is 7.8 I'm converting the 7.8 into integer how will I convert you just need to write the data type before your variable see I have two variables float x = 7.8 8 integer y I wrote y = int of x. I wrote y = int of x. Now x is a floating variable which is converted into integer and it is stored into integer variable called as y and in this process we lose our data. 7.8 is stored as how much mark 7. 7.8 is stored as how much dear 7. So that 8 is a data loss. So in the explicit type conversion we are going to lose our data. In the implicit conversion we don't have any problem with it. So coming to the next question what is C? Explain about types of computer languages and structure of C.
So what is C? I said in the very beginning of the class no C is a procedure oriented programming language which is used to develop system software and application software. Okay. So what is C? C is is a programming language which is developed by Dennis Richie in 1972 at Bell Laborator is USA. C programming language is developed by Dennis Richie in 1972 at Bell Laborator is USA and right now C programming language is under ANC American National Standard Institutes. American National Standard Institutes is taking care of it and as I said again it is used to develop system softwares. Operating systems are examples of system softwares, application softwares and embedded systems and C programming language is considered as one of the generalpurpose programming language.
Learning C programming language gives you the greater edge so that you can learn any another programming language quite easily.
C programming language is portable. C programming language is fast, efficient and reliable.
And coming to the types of languages, we have three types of languages. Machine level language, assembly level language, highle language. Computer understands only machine level language.
Human beings understands only highlevel language. C, C++, Java, Python R are examples of highlevel language. Computer understands only machine level language that is what? Ones and zeros. The lowest level programming, the lowest level language is binary language. Low-level language, machine level language which consists of only two things zeros and ones. Example assembly language done here it consists of some symbolic notations English like language and when you are dealing with the computer or organization the hardware the buses inside your CPU then you need to understand assembly language it is little difficult to learn understand and to implement the simplest one is highle language where you can easily run where you can easily learn, write and implement. The easiest is highle language. So we write instructions in the highle language.
These instructions are converted into machine level language because computer understands only machine level language.
Another important thing C is a procedure oriented programming language where highest importance is given to the procedure that is structure of C language. When you want to write C programs 100% you need to follow the structure.
In the structure the very first section is documentation section which is purely optional. You may write or you may not write.
In the documentation section, we write basically what comments. In this we write basically what comments you know know two forward slashes are for singleline commands. A forward slash with a asterric asterk with a forward slash is used for multi-line commands.
So what is this program? Who is writing this program? What is the purpose of this program? This basic information you can keep in the first section that is documentation section. Documentation section contains comments describing the program's purpose and another information.
Second section is linking section where we write the header files with the help of pre-processor [clears throat] hash include. When I want to give the input to the program, when I want to take output from the program, I need to use printf scanf input and output statements. For this, we need to write the header file. Standard input output dot header file stio.h standard input output dot header file.
When you want to deal with mathematical operations, we write math.h.
When you want to deal with the string operations, we write a string h. The third section is definition section. We define macros here. And for this we use hash define pi 3.14. And remember we are not using any equal to. We are not using any special sign. We are just writing it as hashdefine. It is a pre-processor. Pi it is my constant macro name. 3.14 is the value of it and it is a good programming habit. Variables will be in the lower case small letters. Constants will be in the upper case capital letters like this. Hash define pi 3.14.
So in your program wherever you use pi it value is considered as 3.14.
Fourth one is global declaration section. If you look at the diagram here, see I have a main function section and I have a subprogram section. A big lengthy program can be divided into smaller functions, smaller parts done here. So that your programming becomes easy. Now if I want to use a variable inside the main and as well as inside the subprogram section that variable should be inside global declaration section and we call it as global variables and we call it as global variables. And you can also see there is one more declaration part inside the main. There is one more declaration part inside the main and here you declare variables. Those variables are called as local variables because they are declared inside the flower braces and they have to use inside the flower braces only. You can't use them in the subprogram section because the scope of the local variable is within the function in which it is declared. But sir, I want to use a variable in main in subprogram. So what I'm supposed to do?
Declare it in the global. declare it in a global. So global variables declared here are accessible throughout the program. Local variables which are declared inside the main. They have to use only inside the main. And we have subp part of my program subprogram section. A variable declared in the subprogram section should be used inside the subprogram section only. I can't use it in the main because it is local. If I want to use a main subprogram go to local sorry global and a big program can be divided into smaller parts. Those smaller parts are called as what your subprogram sections. This is structure of C program and a quite good example for the structure of C program.
So we have documentation section. We write comments there. It is purely an optional. You can ignore it. Hash include HDIO.h page linking section header files define pi 3.14159 this is constant in your program wherever you want to use you can use pi it value comes from here constant this is global variable a variable which is declared here can be used anywhere in the program this program consists of only main function I did not uh sorry I went with the subprogram section here now this global variable can be used inside the main inside the sub program anywhere int radius where is this radius inside the main I can't use radius here done that throws me an error float area print enter radius this is a output message displayed to the user these are two lines of declaration of your variables scanf is a input statement reading the value from the user as I'm reading the integer value I took percentage d if I'm reading the flow floating value I can take percentile f now this is area = p<unk> into radius into radius what is this a simple calculation print area equal to percentage dot2f so you are printing the output on the screen and when you write percentage dot2f usually float will print six precision values usually float will print six fractional values after dot we will get six but when you write dot2f you restrict only to two and this is a userdefined function and userdefined function takes two arguments A and B and you are printing the values of it. Now the values for this A and B are supplied from the function call and that will be executed that value will be printed on the output screen. Okay.
Next what are algorithms? What are flowcharts, operators and expressions in C language? See, it is always suggested before writing a C program, we have to write algorithm and we have to go with the flowcharts. What is an algorithm? An algorithm is a step-by-step process written in an ordinary language so that you understand what is input, what is output, how the processing is done. Then convert it into C program then write the C programs.
Don't directly start writing programs.
What you want to solve, what is your problem, what is your answer, please put it in the algorithm. And if you feel algorithm, right, is a kind of boring thing because algorithm is written in the plain text. I want to represent the same thing in the diagrams then take what flowchart because flowchart is a graphical representation. Flowchart is a diagrammatical representation of an algorithm. What all the step-by-step process you write in the algorithms?
Those things are converted into diagrams. Flowchart operators are special signs, right?
Which performs a task as a plus b plus is a operator which adds two numbers.
Now a + b consists of three important things a and b operand. Plus is what?
operator. Now, combination of operants and operators is called as expression a x² + b x + c expression.
Now, a x² is a into x raised to the power of 2 and you do that calculation with the help of operators. So, algorithms are the step-by-step process which is written in the ordinary language. So you solve a problem, you give the solution to a particular problem in a normal readable language like English. It is called as an algorithm. And there are some basic rules for algorithm. You might take one or two inputs. You might take zero inputs also. No problem. But 100% you should generate output of algorithm. And algorithm should be definite. Algorithm should be accurate. Algorithm should be finite. Don't take thousand steps to solve a problem. Don't revolve there only. You need to be very clear in a very finite number of steps. You need to solve a problem. That is this.
Suppose if I ask you to find out the average of two numbers, what is the first thing you need to do? You need to collect two numbers. When I want to find out average of two numbers, I should have two numbers first. That is input.
And you can't walk in this space without any goal. You should have a goal. What is that average of two numbers? And what is the formula of it? Sum of the numbers by number of elements. [clears throat] That is your output. You should travel from your input to output. You should travel from your input to output. I took two numbers. I want to find out average.
How will you find out average? Now you took two numbers. Add them. Divide them by two. That stepbystep process you need to write to the computer. That step-by-step process you need to write to the computer. You say sir it is very easy.
Why you are making it complicated then?
Why should we write all the things? You might say it is very easy thing. Okay.
[snorts] But when you write 10 + 5 by 2, what happens?
5 by 2 is done first because division has a high priority.
So what I'm supposed to do is first I have to calculate x + y and store it in sum then divide some by two so that you get the perfect answer. That step-by-step process you need to give to the computer.
Done here. Now the same thing if I represent in the form of diagrams then it is called as flowchart.
Every flowchart will have a start and stop and it is represented by oval. This is a oval symbol which is used for start and stop.
Then we need to take the input and we need to generate the output that is represented by the parallelogram. a slanted rectangle parallelogram is used for input and output and processing operations like I took two numbers I'm finding the average how did I do I added them I divided them those calculations are represented by process that is rectangle is used for process oval is the start and stop parallelogram is for input and output rectangle is for process rhombus the diamond shape is used for decision making. Like if a is greater than zero, a is a positive number. If a is not greater than zero, it might be a negative number. If a is less than zero, it can be a negative number. See, I have two options. I can go to positive or I can go to negative based upon my condition. That condition is written in the rhombus decision making. These are flow statements. You go left hand, right, top, bottom, arrow marks are used. And this is a connector. When I divided my program into three parts, this three parts are connected with each other with the help of this inage connectors.
Hexagon is used for preparation like initialization of your variables. Those things represented in the hexagon. And this is sub routting that is the subp part of your program which is rectangle with a two bars. which is a rectangle with two bars. Done here. These are the universally used notations, symbols for flowchart.
Start and end of a flowchart. Input and output parallelogram. Rectangle is for operations. Decision making is this. If a is greater than b, a is big. Else ba is big. That decision you can make with the help of this flow lines so that you move around connector. These sub routines are connected with one another subruine using this hexagon is for preparation. Okay. Initialization of your values are something can be done.
And this is one of the simplest example [clears throat] for flowchart then I'm just going with this start. If the n value is greater than zero. If the condition is true, whatever the value given by the user is greater than zero, true, then go inside, find out the sum, find out the count. If it is not, you gave a negative number, I directly jump to the end of my program. I directly jump to the end of my program. If it is true, I come down. I check my condition.
If it is again true, we do the basic calculations. Okay.
Next important topic operators. We have basically eight operators in C language starting from arithmetic. And what is an operator? It is a special sign or a symbol which tells the computer to perform a task like a plus b. Plus is a symbol which adds a and b. Operator is a special symbol that is used to perform specific operation and operand.
Now a + b a and b are operand op e r a n d plus is what? Operator.
So arithmetic operators we have addition, subtraction, multiplication, division and modulus.
Division is represented by forward slash. Modulus is represented by percentage. The difference is division gives the quotient as output. modulus gives the remainder as output. So when you write 11 by 3 when you write 11 by 3 11 is not exactly divisible by 3. So when you write integer 11 by integer 3 quotient is 3 3 into 3 is 9 remainder is how much? Two. So 2 is the output of modulus. 3 is the output of quotient.
Relational operators. Relational operators are used by comparison. less than, greater than, greater than or equal to, less than or equal to like this. Relational operations always gives you the result as zero or one that is true or false.
Logical operators, we use logical and logical or see if I want to log into my Instagram, I need to have my username and password. Username and password. If I give username correct, password correct, then only I can login. That connection can be represented by and same Facebook instead of username I can also give my mobile number or I can also give my email id. See I can give my username or mobile number or mail id not three any one is enough. No done here any one is enough. No out of this three are that connection is represented by this logical not.
Okay. And logical not which makes true as false, false as true. Assignment operators we have equal to as assignment operator. Conditional operators we have question mark and colon where we have one question with two answers.
Expression one, question mark expression two. Colon expression three. If expression one is true, expression two is only executed. Expression three is ignored.
If expression one is false, expression three is executed. Expression two is ignored. Expression one question mark. Expression two colon expression three. Expression one is your condition.
Two is the true case. Expression three is false case. Special operators. One special operator which we already used is size of we also have membership operators member selection operators uh asterric done here pointer and amperson address of used in the scanf those are those are special operators bitwise operators perform the operation at the bit level of your data you convert your numbers into ones and zeros and you perform the operations at that level that is bitwise operator. Last one increment and decrement operators which is used to increase the current value of one by one or decrease the current value of I any variable by one. We take increment and decrement. Increment increases the current value of variable by one.
Decrement decreases the current value of the variable by one. Clear? This ends your unit number
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

Flash Drought in Europe...
WeathermanEurope
36K views•2026-07-24

Nobody Respected The Penguin | The Batman (2004)
SerumLake
12K views•2026-07-24

And Now He Is Coming For More
TheFinePrintYT
12K views•2026-07-24

U.S. BANKS JUST SIGNALED *CLARITY ACT* IS COMING!? WHITE HOUSE AUGUST DEADLINE & XRP REPRICE!
GoodEveningCrypto
10K views•2026-07-24