program development tools

A programming tool or software development tool is a computer program that software developers use to create, debug, maintain, or otherwise support other programs and applications. The term usually refers to relatively simple programs, that can be combined to accomplish a task, much as one might use multiple hands to fix a physical object. The most basic tools are a source code editor and a compiler or interpreter, which are used ubiquitously and continuously. Other tools are used more or less depending on the language, development methodology, and individual engineer, often used for a discrete task, like a debugger or profiler. Tools may be discrete programs, executed separately – often from the command line – or may be parts of a single large program, called an integrated development environment (IDE).

In many cases, particularly for simpler use, simple ad hoc techniques are used instead of a tool, such as print debugging instead of using a debugger, manual timing (of overall program or section of code) instead of a profiler, or tracking bugs in a text file or spreadsheet instead of a bug tracking system.

Modern computers are very complex and in order to productively program them, various abstractions are needed. For example, rather than writing down a program's binary representation a programmer will write a program in a programming language like C, Java or Python. Programming tools like assemblers, compilers and linkers translate a program from a human write-able and readable source language into the bits and bytes that can be executed by a computer. Interpreters interpret the program on the fly to produce the desired behavior.

  • algorithm
  • flowchart
  • program development steps
introduction to c

C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system. The main features of the C language include low-level memory access, a simple set of keywords, and a clean style, these features make C language suitable for system programmings like an operating system or compiler development.

Many later languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language (Few programs may compile iThe memory system serves as the repository of infn C, but not in C++). Beginning with C programming

  • structure of a c program
  • main method declaration
  • header file inclusion

Structure of a C program After the above discussion, we can formally assess the structure of a C program. By structure, it is meant that any program can be written in this structure only. Writing a C program in any other structure will hence lead to a Compilation Error.

Main Method Declaration: The next part of a C program is to declare the main() function. The syntax to declare the main function is: Syntax to Declare the main method:

int main() {}
control structure

A program is nothing but the execution of sequence of one or more instructions. Quite often, it is desirable to alter the sequence of the statements in the program depending upon certain circumstances. (i.e., we have a number of situations where we may have to change the order of execution of statements based on certain conditions)

Repeat a group of statements until certain specified conditions are met. This involves a kind of decision making to see whether a particular condition has occurred or not and direct the computer to execute certain statements accordingly. Based on application, it is necessary / essential (i) To alter the flow of a program (ii) Test the logical conditions (iii) Control the flow of execution as per the selection these conditions can be placed in the program using decision-making statements.

  • desition making statements
  • if-else statements
  • nested if-else statements
  • else-if ladder
  • switch statement
if (expression) // This expression is evaluated. If expression is TRUE statements inside the braces will be executed { statement 1; statement 2; } statement 1;// Program control is transfered directly to this line, if the expression is FALSE statement 2;
arrays and strings

String is a sequence of characters that are treated as a single data item and terminated by a null character '\0'. Remember that the C language does not support strings as a data type. A string is actually a one-dimensional array of characters in C language. These are often used to create meaningful and readable programs.

In C language, arrays are reffered to as structured data types. An array is defined as finite ordered collection of homogenous data, stored in contiguous memory locations. Here the words, finite means data range must be defined. ordered means data must be stored in continuous memory addresses. homogenous means data must be of similar data type.

  • one dimensional arrays
  • two dimensional arrays
  • strings
Declaring and Initializing a string variables: // valid char name[13] = "StudyTonight"; char name[10] = {'c','o','d','e','\0'}; // Illegal char ch[3] = "hello"; char str[4]; str = "hello";
functions and storage classes

A storage class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. We have four different storage classes in a C program −

  • auto
  • static
  • register
  • extern

The auto Storage Class The auto storage class is the default storage class for all local variables.

{ int mount; auto int month; }

The register Storage Class The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).

{ register int miles; }