Practical 1
Practical 1
The C programming language was developed in the early 70’s as a system implementation
language for the Unix operating system. Dennis Ritchie at Bell Labs, USA, originally
developed it. The language was named c because it was successor to a language ‘B’ which
was developed by Ken Thompson in 1969-70, which was derived from Martin Richards
BCPL (Basic Combined Programming Language).
Ubuntu is one of the most popular operating system for programming because there
are lot of great open source applications, tools, compilers, debuggers, IDEs are available free
of cost. Some of them are - GCC - The greatest compiler for C language (from FSF (‘Free
Software Foundation’ by Stallman); Linux Torwalds used GCC while developing Linux
Kernel), Eclipse IDE (The most popular ‘Integrated Development Environment’ for Java
programmers), Netbeans, KDevelop, Codelite etc.
C/C++ language is a high level programming language (although the term high and
low is used in relative sense e.g C is a high level language as compared to Assembly but if we
compare it with java then C is a low level programming language; the term high or low
basically describes the closeness with hardware). Most of the operating systems has been
written in C language. This post has been written for beginners who just started learning
C/C++ or the programmers who have migrated from Windows to Ubuntu (although the
commands are almost same for all Linux based operating system).
void main()
{
printf("Hello! This is my first C program with Ubuntu 11.10\
n"); /* Do something more if you want */
}
If there is no syntax/semantic error in your program then the compiler will successfully
generate an executable file, otherwise fix the problem in your code.
./hello1
Assignment: Create a simple c program using printf () and scanf () functions to input data
from user and to display the same data which is entered.