1. C code - Hello world

Problem: Write a c program which show the line "Hello World!!!"

C program:




Output: Hello World!!!

Description: For this problem only one line is needed for output. Due to line-5  we get the output Hello World!!! .

Here we use a function name printf(), the definition of this function defined into a file name stdio.h that's why we include it at the beginning of program (line-1). Other lines are basic structure of a C program which will be describe later.


libbgi.a - No such file or directory c/c++ program compiling

Problem: libbgi.a: No such file or directory @ CodeBlocks\MinGW\lib\

Solution:
Step-1: Download libbgi.a  from google drive. 

Step-2: Paste this file into that directory.  

Then check your compiling... 

Assembler, Interpreter and Compiler with differences

Computer languages can be grouped according to which translation process is used to convert the instructions into binary code.

Assembler: a program used to translate Assembly language programs. The entire program is assembled before the program is sent to the computer for execution.

Interpreter: A program used to translate high-level programs. Translates one line of the program into binary code at a time:
  1. An instruction is fetched from the original source code.
  2. The Interpreter checks the single instruction for errors.
  3. The instruction is translated into binary code.
  4. The binary coded instruction is executed.
  5. The fetch and execute process repeats for the entire program. 

Compiler: a program used to translate high-level programs.
Translates the entire program into binary code before anything is sent to the CPU for execution. The translation process for a compiled program:
  1. First, the Compiler checks the entire program for syntax errors in the original source code.
  2. Next, it translates all of the instructions into binary code. - Two versions of the same program exist: the original source code version, and the binary code version (object code).
  3. Last, the CPU attempts execution only after the programmer requests that the program be executed.




Interpreter Vs Compiler:
  1. A compiler converts the high level instruction into lower level language (e.g., assembly language or machine code) while an interpreter converts the high level instruction into an intermediate form.
  2. The compiler executes the entire program at a time, but the interpreter executes each and every line individually.
  3. List of errors is created by the compiler after the compilation process while an interpreter stops translating after the first error.
  4. Autonomous executable file is generated by the compiler while interpreter is compulsory for an interpreter program.
  5. Interpreter is smaller and simpler than compiler
  6. Interpreter is slower than compiler.

Programming Languages




When we use the keyboard, mouse or other devices for using computer - what happen?

 - It send command to computer for performing a task (typing word, printing documents etc.).
 - Computer perform a specific task using predefined instructions or program or software for that command.

Here we need communication between user (people) and computer by a medium or language. Computer can understand machine language (bit stream - by 0 and 1) only. But other languages such as assembly language, high level language we can use for communication. So that it need a converter which convert from these instructions into machine language called assembler, compiler or interpreter.

Programming language: A series of specifically defined commands designed by human programmers to give directions to digital computers.



The first high-level languages were introduced in the 1950's. Today, there are many high-level languages in use, such as BASIC, C, C++, Cobol, FORTRAN, Java, Pascal, Perl, PHP, Python, Ruby, and Visual Basic.


Computer Programming - Programming






A computer is a electronic machine that accepts data (sometime information) and manipulates it for some result (or information) based on program or sequence of instructions. These program or instructions given by a programmer (people). Computer can perform many task but can't think. It perform a task by human instructions and guideline.

Computer programming or programming is a way of instructing electronic machines or computer to perform tasks, solve problems and provide human interactivity. 



Programming involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, and implementation (commonly referred to as coding) of algorithms in a target Programming Language.



Data and Information: Differences between Data and Information

Generally peoples are says that the terms Data and Information are interchangeable and mean the same thing. But there is a distinct difference between data and information.

Data can be defined as a representation of facts, concepts or instructions in a formalized manner which should be suitable for communication, interpretation, or processing by human or electronic machine. Data can be any character, text, words, number, pictures, sound, or video.

Information is organized or classified data which has some meaningful values for the receiver. When data is processed, organized, structured or presented in a given context is called information.

Example:
Data:
  • Student Data: Such as name, father’s name, mother's name, date of birth, address etc.
  •  Survey Data: Many companies are collect data by survey to know the opinion of customer about their product
Information:
  • Student profile: Create profile by stored data for identify a student
  • Product Report: Survey data is summarized into reports/information to present to management of the company.


Differences:
  • Data is the raw fact. Information is the product or processed data.
  • Data is used as input for the computer system. Information is the output of data from computer.
  • Data doesn’t depend on Information. Information depends on data.
  • Data is a single unit. A group of data which carries meaning is called Information.