Skip to main content

WHAT IS CSS?ADVANTAGES, SYNTAX.

 CSS PROGRAMMING LANGAUGE                                                                     disadvantages CSS full form is cascade style sheets , which we call it says about how you should display the HTML elements on the screen. CSS tells us the style of the webpage let us take a simple example, if we build a home first we lay out the design that is known as the HTML language. Where the CSS means layout which means giving instructions on how the furniture should be nothing but the CSS. For example if we take PayPal we can see that the background color blue says the CSS background-color property. Netflix is also the best way of saying  CSS property, but if we remove it will be a normal webpage but with the red color and the black plus symbols it looks like the best webpage. Versions of CSS There are different versions available now in case it is developed by Wium we have three versions that are css1, css2, and css3. Currently we are using this css3 version this is the best version fo

OPERATORS IN C?ARITHMETIC, ASSIGNMENT....

 OPERATORS IN C

                                                                
operators



  • An operator is a symbol that acts on data items known as operands in order to process them.
  1.   for eg-  a+b  ("a" and "b" are operands, and "+" is an operator).
  2.               c-a    ("c"&"a" both are operands "-" operator).   
  • We can do addition, subtraction, multiplication, division, etc........
  • Operand and the operator plays a very important role in the programming language.

CLASSIFICATION OF OPERATORS

  • Based number of operands operating upon, operators are classified into three types.
  1. Unary operators(operate upon single operand).
  1. Binary operators(operate upon two operands).
  1. Ternary operators(three operands).
  • On the type of execution they perform on the operands, operators are classed  into six types
  1. Arithmetic operator:-arithmetic operators are the operators which perform addition(+), subtraction(-), multiplication(*), and division(/) that gives the quotient, Modulus(%) is also called modular division gives remainder.
#include<stdio.h>
void main()
{
  int a=10;
  int b=20;
  int c=15;
  int d;
  d=a+b;
  printf("the output is:");
  d=a-b;
  printf("d");
  d=a*b;
  printf("the multiplication is d:");
}
   

  1. The assignment operator that assigns a value to a variable, is nothing but an assignment operator in the assignment only we have further two classifications that are.
        simple assignment operator:- "=" represents the simple assignment operator it means,
        eg- a=10 in this we see that the value 10 is being assigned a.

        The compound assignment operator first performs the arithmetic operation and then assigns the result to a variable, it performs +=,-=,*=,/=,%= is the compound assignment operator in c.
  • In this assignment operator first operates and performs the task and then the resultant value, is been assigned to the variable for eg- a=a+2  this value is an added value being, assigned to a which is nothing but the assignment operator.
#include<stdio.h>
void main()
{
  int e=2,f;
  e=f;
  printf("e=%d\n",e);
  e+=f;
  printf("e=%d\n",e);
  e-=f;
  printf("e=%d\n",e);
}


    3. A relational/Comparison operator that is used to compare two operands for their equality, inequality, smaller, largeness, etc... is known as a comparison operator.
#include<stdio.h>
void main()
{
int a=10, b=20, c=15;
printf("%d==%d , a, b, a==b);
printf("%d>%d, a, b, a>b);
printf("%d<=%d, b, c, b<=c);
}
  • Comparision operators are known as relational operators in C  and it return True/False after comparing two values in c language 0 represents false &1 says true.
  • It is further classified into six categories equality operator, inequality operator, greater than, less than the operator, less than or equal, and greater than or equal.

INCREMENT/DECREMENT OPERATOR

  •  Increment(++):-It increases the value of the operand by 1 for eg-int a=10;
                                                                                                            a++;  
                                                                                                            print("%d",a)
  • In this example, see that an int data type is created a variable named  a++ denotes that the value of a which is 10 will be incremented that is 11, and printing it on the console we use printf and the format specifier of int is %d.
    
       Decrement(--):-It decreases value of the operand  eg-int b=25;
                                                                                                         b--;
                                                                                                         printf("%d",b);
  •  int data type created and b variable with assigning the value 25 to it decremented (--).

#include<stdio.h>
void main()
{
 int a=10,b=25;
 printf("++a=%d\n",++a);
 printf("b--=%d\n",b--);
}

PRE-INCREMENTATION:-First incrementation is performed and then the resultant value is assigned to the variable.
         int a;-->1st line of code
                  int b=12;------>2nd line  code
 a=++b;--->3rd line 
         printf("%d",a);----->4th 
     printf("%d",b);----5th
  • The first line of code int data type has been declared and the variable a,2nd line is the same as the previous line only the difference has assigned the value 12 to it a=b++.
  • The b value is 12 the value is incremented by 13 and it is assigned to the next steps they have printed it using the printf library function and using format specifier.

POST-INCREMENTATION:- First assignment is performed before incrementation after an assignment is  performed incrementation is performed

int a;
int b=12;
a=b++;
printf("%d",a);
printf("%d",b);

    Note:-b++ means post incrementation and ++b pre incrementation.

                                              




              
                   


Comments

Popular posts from this blog

WHAT IS C LANGUAGE? USES, COMPILER

C LANGUAGE C language compiler, C is one of the most popular languages in programming,  Dennis M.RITCHIE invented C programming in the year the 1970s,  C is a high-level programming language which means, its instructions are away from the understanding of the processor. There is a small difference between C language and C++ that is c does not provide object-oriented support. C++ gives class-based support(ORS) which means the same as the previous line in this blog. WHY LEARN C  LANGAUGE Learning C language and a compiler will be useful for coding. Especially for making a website with C language. If we learn C++ it will be useful for making a website. This means C language is only used for making a website but C++ is used for adding colors background colors etc. C language is one of the straightforward languages means easily understandable language. USES OF C LANGUAGE While the C language is used, in the creation of hardware devices.  It is also used in the OS, that is the operating sy

FUNCTIONS IN C?CLASSIFICATION, PARAMETERS, LOCAL VARIABLE.

 WHAT IS A FUNCTION                                                                         function A self-contained, named block of code that performs the specific task when called is nothing but a function. Note:-functions are the task performers in C projects.  FUNCTIONS CLASSIFICATION We have 2 types of functions they are user-defined functions and library functions. A pre-created function that comes with C installation is nothing but a library function, For eg:- print () and scanf(). Library functions are ready-made named code blocks. We need not create them, Just use them in our programs. We can make use of this library function by making the library function available to the program and the next step is calling the library function. Our own created function which is the program-created function is nothing but a user-defined function , eg- the main function is the example of a user-defined function. BENEFITS OF USER-DEFINED FUNCTION There are many benefits of user-defined func