Posts

Showing posts with the label main() function

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 ...

Programming In C, main() function, global and local variables, Comments in C Language

Image
Question 1.  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. The body of main() Function . The body of the function main() is surrounded by braces {}. The left brace indicates the start of the body of the function and the right brace indicates the end of the body of the  function. Question 2: 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 use...