Skip to main content

C language full course | c language revision

 BCA SYLLABUS AND QUICK REVISION NOTES

SOURCE: KHWAZA MUINUDDEEN CHISHTI AND LUCKNOW UNIVERSITY


subject ; c language complete notes

1. What is c language?

ans:c language is a middle level procedural programming oriented programming  language developed by  "DENNIS RITCHIE"  at "AT&T's in Bell labourties in 1972 in USA.

SYNTAX OF C LANGUAGE:

It is the basic syntax of c langauge:


 #include<stdio.h>

#include<conio.h>

void main()

{

statement;

   }

 syntax rule for C Program

  • C is a case sensitive language so all programms in c written in lower case letter.
  •  C statement must be end with a semicolon.
  • Whitespace is used in C to describe blanks and tabs
  • space is required between keywords and identifiers




Keywords

  • Keywords are preserved words that have special meaning in C language.
  • The meaning has already been described.
  • These meaning cannot be changed.
  • There are total 32 keywords in C language.


Identifiers

In C language identifiers are the names given to variables, constants, functions and user-define data. These identifier are defined against a set of rules.

Rules for making identifiers

  • An Identifier can only have alphanumeric characters ( a-z , A-Z , 0-9 ) and underscore( _ ).
  • The first character of an identifier can only contain alphabet( a-z , A-Z ) or underscore ( _ ).
  • Identifiers are also case sensitive in C. For example name and Name are two different identifier in C.

  • Keywords are not allowed to be used as Identifiers.
  • Data types in C Language

    Data types specify how we enter data into our programs and what type of data we enter. C language has some predefined set of data types to handle various kinds of data that we use in our program. These datatypes have different storage capacities.

    C language supports 2 different type of data types Primary data types and Derived data types.

  • Data types in C Language

    Data type specifies the size and value of data.

    C language supports 2 different type of data types Primary data types and Derived data types.

    Primary data types

     There are mainly five types of primary data types in c langauge...

  •   int

  • floAT 

  • CHAR

  • DOUBLE

  • VOID

  • secondary data types



  •  arrays

  •  functions

  •  structures 

  •  pointers.


  

Variables in C Language

Variable is the name of memory location where the data stores.

A programmer can choose a meaningful variable name.
Example : averageheightagetotal etc.

Rules to define variable name

  • Variable name must be upto 8 characters.
  • Variable name must not start with a digit.
  • Variable name can consist of alphabets, digits and special symbols like underscore _.
  • Blank or spaces are not allowed in variable name.
  • Keywords are not allowed as variable name.

Declaration of variable

Before making programm we have to declare the variable.

We have keep two things in our mind before declaring variable.

  • It tells the compiler what the variable name is.
  • It specifies what type of data the variable






#include<stdio.h>
#include<conio.h>
void main()
{
    int a,b,sum;    //variable declaration
    a=30;
    b=20;
    sum=a+b;
    printf("Sum is %d",sum);}
    getch();

So hey friends this blog was the about basic things in c language. I have made this notes by own and i am gonna to share c langauge full notes for quick revision...
I will ,ake 2 other post for c language ...
I hope you enjoy this article ,if yes then share it with your friends and i will see you soon 


----student of KMCLUBCA 1ST YEAR

Comments

Popular posts from this blog

Network and Topologies details Notes for BCA| KMCU LUCKNOW

Computer Network: An interconnection of multiple devices, also known as hosts, that are connected using multiple paths for the purpose of sending/receiving data or media. Computer networks can also include multiple devices/mediums which help in the communication between two different devices; these are known as Network devices and include things such as routers, switches, hubs, and bridges. The arrangement of a network that comprises nodes and connecting lines via sender and receiver is referred to as network topology. The various network topologies are:   a) Mesh Topology : In a mesh topology, every device is connected to another device via a particular channel. Figure 1: Every device is connected with another via dedicated channels. These channels are known as links. Advantages of this topology : 1.It is robust. 2.The fault is diagnosed easily. Data is reliable because data is transferred among the devices through dedicated channels or links. 3.Provides securi...