This video provides a comprehensive explanation of Unit 1 for B.Com Computer Application students, covering six types of C programming operators (arithmetic, relational, logical, assignment, increment/decrement, and bitwise), formatted input/output operations using scanf() and printf() with format specifiers (%d, %f, %c, %s), and the basic structure of a C program including header files, main function, variable declaration, statements, and return statement. The video also explains data types in C, including basic types (int, float, char, double) and derived types (array, pointer, structure, void).
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
C & C++ UNIT-1 | Degree Sem-2 Bcom computers C & C++ UNIT-1 full & easy explanation |π―Full marksAdded:
Hello everyone, welcome back to our channel learn with Sahira. In this video I'm going to give you the complete and clear explanation of unit number one from the subject C and C++ which is for degree first year second semester B.com computer students. By watching this video you will be perfect with unit number one from C and C++ subject and whatever the question they might ask you in the examination from unit number one, you will be able to write the answer and easily you can score full marks from that unit, okay? So, watch the video till end and if you are new to our channel learn with Sahira, subscribe it for more videos and don't forget to share this video with your friends, too.
If you want the notes of C and C++, let me know on my Instagram, drop me a message there. I will be giving you easy, simple and clear to understand notes. But note, payment is must.
Keeping this aside, let us get started with unit number one complete and clear explanation. First important question what I gave you in unit number one is what are the various types of operators used in C programming. I think you all are aware of operators. Already in semester one you have written and you have read operators, right? So, that operators are only given in this C programming also. You just need to understand them in the better way so that if they ask you in the examination, you should be able to write.
Let us see, you are having six types of operators in C programming. One is arithmetic operators which are used for mathematical operations like addition, subtraction, division, multiplication and all that. Relational opera- operators. Relational operators are nothing but which are used to compare two values like greater than, less than, equal to, yes or no? When we are comparing both the values or both the things, we will be using relational operators, right? It is greater than that, it is less than that, like that.
Then we have logical operators. It means it is used to multiple conditions. Like this and that, this or that, not this, that, like that. Logical operators are used to combine multiple conditions. So, conditional operators are also be said as logical operators. Okay? Assignment operators are nothing but when we assign values to the variables, that is nothing but assignment operators. The most important and the basic one is equals to. Whenever we are using equals to, it is also known as assignment operator, okay? And it is under relational operator, also. Assignment is nothing but if there is a value A, if there is a variable A, when we are assigning 10 to that variable A, then that is nothing but assignment operators. By using assignment operators only we will be assigning a numerical value or value to the variable.
Increment or decrement operators, like it can be increase or decrease a value by one. Bitwise operators are nothing but the operations which are done at binary level.
By using bitwise operators, okay? First, let us see about arithmetic, then we will be going line wise, okay?
Arithmetic, I think you all know, okay?
Whenever they ask you this question, you have to be able to write the answer because you all know already mathematical operations, like addition.
It adds the values. Like A plus B, already we have assigned the values here. A is 10 and B is 5. When we add both of them, it is 15. Minus means nothing but subtraction.
It subtracts the values, like 10 minus 5 equals to 5. It is multiplication. The star which you see, you don't have X, okay? In the programming or in the coding, you don't have X, you have star.
So, it is nothing but multiplication.
When we multiply 10 into five, it is 50.
Uh this slash which you are seeing, this is nothing but dividing. Divides. It is the division. A division by B is nothing but two. When we get the remainder, when we want to see the remainder, we will be using this symbol, percentile, okay? So, remainder, definitely it will be zero, okay? When you want to do the calculations, we use arithmetic operators. Okay, so these are Whatever you have learned the calculations in your mathematics, you can put it here, okay? Then we have relational operators.
As we have discussed, it compares two values, okay? Uh it will not give that this is that and that is this. They will just give you output as zero, one, or zero, one. Zero means false. One means true. Okay. So, this double equals to when you are keeping, just not one, one one equals to you're not keeping. If you keep two, then it is equal to in programming. Like already we have assigned the values. A double equals to B? No, both are different numbers, so it is false. It will not give false. It will just give you zero. You need to understand it is false. Then when you just give this exclamatory mark, in English we will be saying exclamatory mark, no? So, I have a habit of saying it as exclamatory mark only.
Then we give equals to, it is not equals to. A is not equals to B? Yes, both are different, so it is true. Like it is greater. A is greater than B? Yes, A is greater than B, because it is 10 and that is only five. So, one. This is less than. Zero. False. It Here greater than or equals to like we are using or. When we use or when we use or, you see here it is when we combine multiple conditions, yes?
So, is it true?
Here we are, this is yeah.
So, is it true? Yes. Less or equals to?
No. So, here we check conditions if or while loops, okay? Then we have logical operators as we have seen and or not.
Okay, and or not. And means when we use both the and, that is nothing but and.
So, here we you can see the example when we when we are having one, it is nothing but true. So, this is nothing but not yes, it is true. Okay.
Mostly used in if statements with multiple conditions, okay? Assignment operators, as I said as I said you equals to is the basic operator of assignment, yes or no? Like we are assigning a equals to 10. Okay, when we add and assign like a plus equals to 10 plus five, how much it will be? 15. When we subtract when we subtract three from 15, it will be 12. When we multiply and assign, when we multiply and assign, it is 24. Then we divide and assign, it is six, okay? Now, let us go with increment and decrement. Increment means nothing but two times plus will be there, two times minus will be there. When you have two times plus, it is increment like a two times plus, a equals to a plus one, okay? Decrement, a equals to a minus one. It is useful in the loops like for or while, okay? Then we have last one, bitwise operators. Bit level operations we will be doing like and already we have seen, or already we have seen this is bitwise XOR. So, this is something but no need to go with this. You just be perfect with the bitwise operators. What do you call it?
Definition or meaning. No need to write the examples, okay?
Till bitwise no need to go with only till five it is okay. For bitwise you just go with the definition or meaning, okay? So, first complete explanation we have seen. Now, let us go with the second. Explain formatted input output operations. Input and output operations in C, what are they? scanf and printf.
Why we use scanf? When we want to give the input we will be using scanf, okay? scanf parenthesis. This the brackets which you are seeing here on the screen, these are known as parenthesis, okay? So, scanf is used to take input from the user. That's what I said, right? When we want to give the input we will be using scanf. It reads the input in a specific format based on the data type, okay? Based on the data type, whether we are giving variable, whether we are giving the integer, floating, whatever we are giving according to it it will be taking the data and using the specific format, okay? So, here the syntax is there.
scanf parenthesis double quote format specifier. Like format specifiers we will be seeing now here. So, when we want to give any variable or something like that we just need to give a comma and we need to and and the variable parenthesis close semicolon. So, this is the scanf syntax. Then the format specifiers are nothing but percentile D is used for integers. When we are giving integer here we need to use percentile D. When we are giving floating values. Floating values are nothing but decimal values.
When you have 2.09 like point if you have that is used to put floating value or data it's uh it is known as floating values. Percentile C for characters like a b c d e f g. Uh then we have percentile S for strings.
Okay, you can just have a look at the example you will come to know. int age Okay, see int age. Here we are giving integer number. Okay, number is nothing but what the number we are giving is age semicolon scanf %d. While we are using integers we have said that we will be using this format specifier %d. So, we are using %d and we are giving it age.
Okay, age is nothing but just the variable. When we give this it will ask for the input from the user. If we give 22 it will show us 22. If we give 25 it will show us age as 25. So, whatever the int and age we give accordingly it will show us the output. Then we have output formatted output printf which is used for uh displaying the output. Okay, printf we will be using like when we give the output we want the input, right? So, when we want to see the output we use printf parenthesis. Okay, syntax you can see in the same way but we have printf here. Then common format specifiers whatever we have seen up they are down also like int age equals to 20 then age is %d age. So, this is nothing but the example of using printf that is output operator.
Both use format specifiers to handle different types of data. Format input it is used to take the input. It is a format specifier use usage input. Then it have format specifiers are written into uh inside double quotes. Very, very important, okay? So, these are all the things whatever we have learned in format input and output, okay? So, I hope you have got what are the formatted input and output. Nothing you have to do. Whatever I have given here like it takes the input. It uses the format specifier and this format specifier need to be written inside the double quotes, okay? Like the variable name must have and before it but definitely like you can see here.
And we are giving, right?
Where does it here?
See, and should be given definitely. And uh it reads input inside the specified format, okay? Format specifiers whatever we use percentile D. Here only you will be getting one mark now, okay? So, make sure you write this format specifiers.
Then output is nothing but whatever we have learned from scanf, it is for printf also but it is for output, okay? So, subscribe our channel Learn with Saira if you're watching the video. And for the notes you can text me on my Instagram. Then we have third important question that is explain about data types in C language. Already I think you all are aware of data types in semester one you have already read. If not, no issues. We will be reading it now.
So, basic data types are int, float, character, double. Int is for numbers like the examples are given here. Float is for decimal numbers as I said you.
Character is nothing but A, five, single character, okay? Then we have double. It is for bigger decimal. When we have bigger decimal numbers, double we will be using. Then derived data types are array. Array means nothing but group of some type of values. Any group now.
Whenever the values are in a group, then that is known as array. Pointer, it stores memory address, okay? Wherever the memory is located, that memory address it will be locating like where is our hall, where is our bedroom, we will be knowing, right? The address of it. So, in the same way, memory address is stored with the help of pointer.
Structure is nothing but it groups different data types. Whenever you have all these integer, float, character, double, all that, it will be Sorry, grouping all the data types, okay? Void. Void is nothing but no value. I think you all know. Then, data types helps the C program know what kind of data to expect and how much memory to use, okay? So, these are the different data types. If you want to write the fully like in the theory part, you can also write like there are different data types in C language which can store like numbers, characters, or decimals. So, we will be discussing about them in brief.
First, we have basic data types.
Integer. These are the data types which are used for whole numbers. Whenever we are expecting or whenever we want to give the whole number like example 10 or minus five, we will be using int. Then, we have float which are used for decimal numbers or point values like example 3.14 all that. Like that, briefly you have to write, okay? This will be the answer. Only each answer like it. What do you need to do? You need to prolong the answer. That's all. In your own words, adding few more words. Then, we have basic structure of C program. A basic structure is nothing but it is the standard way to write a program in C.
Like basic structure will be there, right? We need to mention or we need to maintain that structure. As I said you in English, I said you all to write the summary in a structure, right? First, about the author, then about the story, then summary, then conclusion. There is a structure, right? I have given you the structure to write the summary. In the way to write a program in C, we have a basic structure. That is nothing but basic structure of C program. So, what is the basic structure you need to mention? Okay, theory also you have to write in the same way you need to show the structure of that C program. So, let us start. First, we have header files.
So, these are the files that include predefined functions needed in the program. So, example, this will be the must in C program of C. Okay, include stdio.h.
Above, the heading starting my heading here you need to get it out. Okay, let's you use input and output functions like printf and scanf. Okay, so include stdio.h is very important. Without this, every C program cannot be started or cannot be written. Then, we have main function.
This is the main part where the program starts running. Okay, every C program must have one main, at least one main function. Without main, there will be no C program. So, first it is header file, then we have main function, then we have variable declaration. Whatever the variables we use or whatever the variables we use to keep the data or store the data, that variable declaration should be given after the main. Then, we have statement or logic like the instructions or the commands or the code which is given by us. Then, we have return statement.
Okay, so either it may return one or either it may return zero. Okay, so this this is the basic structure like first header files, then main function, variable declaration, statement logic, and return statement. If you just write from here to here, you will be getting >> [clears throat] >> five marks easily. Okay? If you want three more marks, you need to write this example. That's all. Eight marks will be in your hands. No doubt in that. No need to write this, that. If you just purely mention from here to here, eight marks will be in your hands. Like first, as we have discussed header file, include stdio.h, then we have seen main function, right?
So, main function in the main function, we will be throwing which data type we are using, int. The main function will be always with parentheses. So, int or float or anything like that you need to give, then you need to give the main function, then open curly braces. These are the curly braces or flower braces, they are called as. Then, int variable variable for variable, we are assigning the value 10, then semicolon. Printf means the output which we want is %d. Int is %d, right? %d is used for integers. Yes, already we have seen format specifiers.
So, we will be using this for int, then comma A. How much is the A? A is 10.
Then, return zero. This is very, very important return statement. Must semicolon, then close the flower flower braces. So, the format which you are seeing here, you need to write in this way only. Don't write int here or printf here. See, after the main only it should be given. So, this is the basic structure of C programming. Okay? So, this was the complete and clear explanation of unit number one. Hope you liked it. If yes, let me know in the comment section. For unit number two, you should watch our channel playlist C and C++. Semester two C and C++. You will be finding all the videos regarding C and C++ subjects, okay? So, stay tuned. All the very best. Bye-bye.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 viewsβ’2026-05-28
How agent o11y differs from traditional o11y β Phil Hetzel, Braintrust
aiDotEngineer
450 viewsβ’2026-05-28
Re: π£οΈπthepropheduπ2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 viewsβ’2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanationπ―β
LearnwithSahera
1K viewsβ’2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 viewsβ’2026-05-29
Search Algorithms Explained in 60 Seconds! π€π¨
samarthtuliofficial
218 viewsβ’2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 viewsβ’2026-05-30
Instagram accounts got PWNed
EricParker
13K viewsβ’2026-06-03











