C-PROGRAMMING#1_INTRO

#INSTALLATION

#INTRO

  • History: The name C is derived from an earlier programming language called BCPL (Basic Combined Programming Language). ...

  • C++ is an object-oriented language, unlike C which is a procedural language.

  • As we know C is the most powerful language in computer field ,which is developed by Mr. Denis Ritche around 1970 and it was developed after previous existing language 'B' . B was also famous before C so letter 'C' in 'C language ' is just stand for represent a successor of 'B'
#BASICS:
#COMMENTS: COMMENTS IN C PROGRAMMING ARE NOT EXECUTED
  • SINGLE LINE COMMENT: //
  • MULTILINE COMMENT: /*
  • SHORTCUT : CTRL + /
#TYPES OF VARIABLE
  • INTEGER VARIABLE :int a = 3;
  • REAL VARIABLE :
  • int a = 3.3;[not to use] float/DOUBLE a = 3.3;[u can use point]
  • CHARACTER VAIRABLE char C = 'U';

# WHY RETURN 0; IN END?

In C and C++ programs the main function is of type int and therefore it should return an integer value. ... On most operating systems returning 0 is a success status like saying "The program worked fine". In C++ it is optional to type " return 0; " at the end of the main function and the compiler includes it automatically

# RECIVING INPUT FROM USER

In ORDER TO TAKE INPUT FROM USER AND ASIGN TO A VARIABLE, WE USE
scanf FUNCTION 
  • scanf("%d", &a);   / line-8/11
&-is the address of the operator and it means that the supplied value should be copied to the address which is indicated by the variable a


# USER SNIPPETS

[make code easy to handle]

SETTING --> USER SNIPPETS --> c.jason

  • q+tab --> made shortcut
   "Print to console": {
        "prefix""qq",
        "body": [
            "#include<stdio.h>\n",
            "int main(){",
            "\t$1",
            "\treturn 0;",
            "}"
            
        ],
        "description""Log output to console"
    }
}

#C-PROGRAMMING OPERATORS


#operators-Example
#THERE ARE SIX OPERATORS
  1. C Arithmetic Operators
  2. C Increment and Decrement Operators
  3. C Assignment Operators
  4. C Relational Operators
  5. C Logical Operators
  6. C Bitwise Operators
#PRIORITY OPERATORS DEF

#PRIORITY OPERATORS
#TYPE CONVERSATION AN ARITHMETIC OPERATION BETWEEN!




Post a Comment

If you have any doubts, please let me know

Previous Post Next Post