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

BASIC PROGRAM IN C LANGUAGE? INCLUDE, HEADER.

SIMPLE PROGRAM TO PRINT NAMES ON

                    CONSOLE USING C LANGUAGE

Programming language



  • #include <stdio.h> which means that <stdio.h> is the header file that says, that standard input and output header file, so every time there is a format writing the c language program that is the starting line of the code.
  • And Include is the command that we use in the program to include the header file <stdio.h> and this file contains the Printf function means to, display any text onto the console.
  • To use the print function, we need to use #include<stdio.h> then only the print function can be accessed otherwise not. 
  •  The first line of the code of the program is, #include<stdio.h> this is the most compulsory step we can say in a c program.
                                                                         
                                                 #include<stdio.h>


VOID MAIN( )

  • And the next step in the code of the program is, void main( ) which means main function header, this will be the header part of the c program this is the second most important line of code in the program.

  • Program execution starts from which part of the program, is known as an entry point of that program, C program execution starts from "main" it is the entry of a program.
  • So we can say that the main function is the entry point of a c program.
  • The next step is the curly brace { which says, that the main function definition starts this is similar to HTML tags of opening and closing.  

                                                            void main( )

  • In c language there is a case sensitive which means that no capital letters are not allowed, and square brackets also.

 MAIN FUNCTION STARTS {

  • In the same way in C, we use again the curly brace { as the definition starts of the main function.
  • So in the body of the program, we need to write the text, which we print onto the console firstly we should use Printf.
  •  This means to display something and parenthesis and within the double quotes write what you want to print.
  • For example: "Good" and at last we need to keep a semicolon if we don't keep a semicolon on it leads to a compilation error.
  • So we write it as Printf("good"); this is the body part of the program and then finally for closing the program we again use curly brace } This is how our program then starts to execute.

                                                           {

                                                                  Printf("Good");

                                                             }

PROGRAM

                                   #include<stdio.h>---------->1st line of code

                                   void main()------------->2nd line of code

                                  {                 ------------->3rd line of code

                                         printf("good");---------->4th line of code

                                       }                    ------------>5th line of code


  • Now let us see another example, to print your name we need to write the same as above there are some changes in it.

                                  #include<stdio.h> 

                                   void main()

                                 {

                                    printf("name is xxx");

                                 }

  • The print function is very important because it lets us print on the monitor very important lines of code in the programming language.
  • Within the double codes write the code that you want to display on the monitor is nothing but the code.
  • The Next example is the homework set you can try which is to rewrite the above program for your name.
  •  This is about a simple and easy program about, how to display something on the monitor.

PRACTISE 

  • To add two numbers to the c language program
#include<stdio.h>
void main()
{
int a =10;
int b=20;
int c;
c=a+b;
print(c);
}
  • Get the values from the user and subtract them.
#include<stdio.h>
void main()
{
int a=30;
int b=10;
int d;
d=a-b;
print(d);
}


  • In the next blog, We learn some of the different data types and their use in the programs, format specifiers, and examples we are going to learn about each program also.

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

OPERATORS IN C?ARITHMETIC, ASSIGNMENT....

  O PERATORS IN C                                                                  operators A n op erator is a symbol that acts on data items known as operands in order to process them.   for eg-   a+b   ( "a" and "b" are operands, and "+" is an operator ).               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 B ased number of operands operating upon, operators are classified into three types. Unary operators(operate upon single operand). Binary operators(operate upon two operands). Ternary operators(three operands). On the type of execution they perform on the operands, operators are classed  into six types Arithmetic operator :-arithmetic operators are the operators which perform addition( + ), subtraction( - ), multipli

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