Structured Programming-C Language

Subject: Computer Science

Find Your Query

Overview

C is a structured programming language developed by Dennis Ritchie at Bell Laboratories in 1972. A program in C language can be divided into small logical and functional modules. C++ language is an expanded version of C.This note provides an information about Structured Programming-C Language.
Structured Programming-C Language

C Language

C is a structured programming language developed by Dennis Ritchie at Bell Laboratories in 1972. Since C is a structured programming language, a program in C language can be divided into small logical and functional modules. C++ language is an expanded version of C.

Character set:

The character set consists of alphabet, digit or special symbols used to response information.

Character sets used in C

Alphabet Uppercase ( ie A, B..............Z)

Lowercase ( ie a, b ................z)

Digits 0, 1, 2 ................... 8, 9
Special symbols +, -, *, ( ) , etc.
Characteristics of C Language
  • It is a small programming language that consumes less space.
  • It has enough number of inbuilt functions and operators.

Keyword:

The character set consists of alphabet, digit or special symbols used to response information.
There are 32 characters in C:
Auto, If, While, For, Int, float. etc.

Scholarships after +2 Abroad Studies Opportunities
Data type:

Data type refers to the type of data or variable which is to be stored and used in the program.
List of data types

  • Integer (int) = 2 bytes
  • character (char) = 1 byte
  • float (float) = 4 bytes
  • double (long integer) = 8 bytes

Difference between QBASIC and C-Language
Q-BASIC C- Language
It is a high level language without feature of low level language. It is high level language with some features of low level language.
It is mostly used for designing application software. It is mostly used for designing system software.

Operators

Operators are the symbols which are used to compute values and test multiple operations. The data on which the operators are performed are known as operands.

Types of operator

  • Arithmetic operator: The operators which perform mathematical expressions like addition, subtraction, multiplication and division.
  • Relational operator: Relational operators are symbols used to compare two different expressions. The result of the comparison is either True or False.
  • Logical operator: Logical operators performs tests on multiple relation. Example: A < B and A > B
  • Unary operator: C also supports two very important operators called increment and decrement operators.

Loop

A loop causes a section of a program to be repeated a certain number of times. The repetition continues while the condition set for it remains true. When the condition becomes false, the loop ends the control is passed to the statement following the loop.

Variable

Those value which changes during program execution is called variable.Example: A = 5 where A is a variable

Constant

Those values which can't change during the program execution is called constant. Example: A = 10 where 10 is a constant

Rule for naming variables in C
  • Space is not allowed in variable name.
  • Both upper and lower case letters are permitted.

Printf: This statement is used to display the message on the screen.
Scarf: This statement is used to accept a value.

Things to remember
  • C language is a structured programming language developed.
  • Qbasic is a high level language without feature of low level language whereas c language has some features of low level language.
  • The character set consists of alphabet, digit or special symbols used to response information.
  • The character set consists of alphabet, digit or special symbols used to response information.
  • Data type refers to the type of data or variable which is to be stored and used in the program.
  • Operators are the symbols which are used to compute values and test multiple operation
  • It includes every relationship which established among the people.
  • There can be more than one community in a society. Community smaller than society.
  • It is a network of social relationships which cannot see or touched.
  • common interests and common objectives are not necessary for society.
Videos for Structured Programming-C Language
C Programming 04 - Introduction to C programming language
C Programming Language Tutorial-Lect 3 Variables and Data Types
Learning to Program in C (Part 01)
Structures and Unions in C Programming
Questions and Answers

Structured programming is a programming pattern aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and loops.

C language is a structured programming language developed by Dennis Ritchie which has features of both high level language and low level language.

Any two features of C language are as follows:

  • C language can be used for developing application programs and system programs
  • C language has enough number of built in functions and operators.
The basic data types of C language are as follows:

  • Character set
  • Identifiers
  • Keyword
The machine readable code which is obtained after the translation is called object code and the instructions written using C language is called source code.
Quiz

© 2019-20 Kullabs. All Rights Reserved.