8escs01 problem solving through programming unit-2: c programming basics



Download 0,98 Mb.
bet4/22
Sana19.05.2023
Hajmi0,98 Mb.
#940862
1   2   3   4   5   6   7   8   9   ...   22
Bog'liq
Module 2 c program

‘{‘ and ends with ‘}’ .
13

STRUCTURE OF C PROGRAM


14
RULES FOR WRITING ‘C’ PROGRAM
  • All the statements should be in lower case letters.
  • Upper case letters are only used for symbolic constants.
  • Blank spaces may be inserted between two words. It is not used when declaring variables, keywords, constants and functions.
  • The program statements can write anywhere between the two braces following the declaration part.
  • The user can also write one or more statements in one line separating them with semicolon (;)

EXECUTION OF ‘C’ PROGRAM

EXECUTING C PROGRAM

  • Execution is the process of running the program, to execute a ‘C’ program, we need to follow the steps:
    • Create/Edit the program
    • Compiling the program
    • Checking errors
    • Linking Libraries
    • Executing the program

EXECUTING C PROGRAM


(i) Create the program
  • Steps are as follows:
    • This is First Step is Creating and Editing Program.
    • Firstly, we have to write a C program using an editor.
    • Save the Program by using [.C] Extension.
    • File Saved with [.C] extension is called “Source Program “.

    • (ii) Compiling the program
  • Compiling C Program: C Source code with [.C] Extension is given as input to compiler such as Turbo C and compiler converts it into Equivalent Machine Instruction.
  • Compiler Checks for errors. If source code is error-free then Code is converted into Object File [.obj ].

EXECUTING C PROGRAM


o If program is error-free, then program is linked with appropriate
(iii) Checking Errors
  • During Compilation Compiler will check for error, if compiler finds any error then it will report it.
  • User has to go back to the source program and edit the program to correct the errors.
  • After editing and saving the program, it is compiled again to check for any errors.
  • The program is linked with other libraries.
  • The process of linking the source program with libraries and18 header files is achieved using a software called Linker.

libraries.

Download 0,98 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   22




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish