Programming in C, IDE, main() function, global and local variables.
Topic: Programming in C
Question 1: Describe the programming environment.
Answer:
Programming
environment is the set of processes and programming tools used to develop
computer programs. In the past programmers used various standalone programming
tools for developing computer programs. These includes editor, compiler,
linker, debugger, etc. Using separate programs provided a difficult and time
consuming environment for creating a computer programs. Today programmers use
IDE.
Question
2: What is integrated development environment?
Answer:
Most
of the new programming languages use integrated development environment (IDE)
to create, compile and run programs. IDE is computer software that brings all
the processes and tools required for program development into one place.
Today’s modern IDEs have user friendly graphical user interface(GUI).
Question 3: Describe the purpose of the main() function and the body of main() function.
Ans: Every C
program must have the function main() which is the first section to be executed
when the program runs. The word void before the function main() means that this
function does not return a value and the second void inside the brackets means
it does not have any argument. When we run a program the main() function is
always executed first no matter where it appears in the program.
Question 4: Define global and local variables.
Ans:
Variables
are used in C program to store values.
Global
Variables.
Global
variables are declared before the main() function. These variables are used anywhere
in the program.
Local
Variables.
Local
Variables are declared within main() function and are used only within a
function in which they are declared.
Comments
Post a Comment