Posts

Showing posts from December, 2022

OPERATORS IN C

Image
 OPERATORS:                       Operators are the foundation of any programming language.We can define operators as a symbols that help us to perform sepcific mathematical and logical computations  on operands .In other words we can say that an operator operators the operands .For example , ‘+’ is an operator used for addition, as shown below:           Ex:- c = a + b; Here, ‘+’ is the operator known as the addition operator and ‘a’ and ‘b’ are operands. The addition operator tells the compiler to add both of the operands ‘a’ and ‘b’.    C has many built-in operators and can be classified into 5 types:             1. Arthematic operator.             2. Relational operator.             3. Logical operator.             4. Bitwise operator.       ...

STRUCTURE OF C PROGRAMMING

Image
   * The structure of a C program can be mainly divided into six parts, each having its purpose. It makes the program easy to read, easy to modify, easy to document, and makes it consistent in format. * The first line of the program #include is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. * The next line int main() is the main function where the program execution begins. * The next line/…./ will be ignored by the compiler and it has been put to add additional comments in the  program.so  such lines are called comments in the program. * In c #include it is a header file and ,it has many built-in functions. * we use that built in function in this code i.e, printf(),scanf(). we used printf() to print the statement and we used scanf() to read that statement. * The addTwoNumbers this method , it does not return any value so the return type of this method we have taken as void. suppose if that function is retu...