Programming Fundamental

Introduction of ‘C’ language.

C is concise yet powerful computer programming language.

 What is program?

A well-defined set of instructions given to the computer is called a computer program.

Write the names of different Programming Languages?

Low-level Languages          2) High-Level Languages.

Describe Low-Level Languages?

Low-Level Languages are near to computer hardware and far from human languages. The Low-Level Languages are divided into two types (1) Machine Language (2) Assembly Language

Describe Machine Language and Assembly Language?

  • Machine Language:-

 Any computer can directly understand only its own machine language, defined by its hardware architecture. Machine language generally consists of numbers (0 and 1).

  • Assembly Language:-

Assembly Language is a low-level language. It is one step higher than machine language. In assembly language, machine instructions are replaced with English-like words known as mnemonics. It is pronounced as Ne-Monics.

Describe High-Level Languages?

High-Level Languages are near to human languages and far from computer hardware.

Write development environment of C program?

Edit, preprocess, compile, link, load and execute.

What is fatal error and Non-fatal error?

Divided by zero is generally a fatal error. Fatal error causes the program to terminate immediately without successfully performing its job. Non-fatal errors allow programs to run to completion, often producing incorrect results.

Write a simple C program printing a line of text?

//first program in C printing a simple line of text

#include <stdio.h>   //preprocessor directive

#include <conio.h>  //header file for console screen

//main function start program execution

int main (){

    printf(“Welcome to C!”);  //show message on console screen write in ” “

    getche();

    return 0;

} //end main function

What is Comments in C?

begin with //, indicating that these two lines are comments. You insert comments to Programs and improve program readability.

Multi-line comments in C?

/*…*/ multi-line comments in which everything from /* on the first line to the */ at the end of last line is a comment.

What is #include<stdio.h>?

#include is a preprocessor directive. Lines begins with # are processed before compilation. Preprocessor directive include the contents of the standard input/output header<stdio.h> in the program. This header contains information used by the compiler when compiling calls to standard input/output library functions such as printf.

Blank lines and white spaces?

You use blank lines, space characters and tab characters to make program easier to read.

What indicates parentheses () after main function?

The parentheses ( ) after main indicates that main is a program building block called a function.

What is a block in C?

Portion of the program between the braces { } is called a block. ‘{‘ left brace ‘}’ right brace.

What is the use of semi-colon (;) in C?

Every statement must be end with a semi-colon also known as statement terminator. When the preceding statement is executed its print the exactly same message written in double quotes in the printf statement.

What is escape sequence and its description?

The backslash ‘\’ is called an escape character.

\n means Newline. Position the cursor at the beginning of the next line.

and \t means Horizontal tab. Move the cursor to the next tab stop.

Advertisements

4 thoughts on “Programming Fundamental

  1. I am student of Computer science from East London. Thank you for this basic information in detail and i like your way of expressing. Share more information please.

    Like

your comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s