C is mother language of all programming language.
It is a system programming language. It is a procedure-oriented programming language. It is also called mid-level programming language.
C evolved from a language called B, written by Ken Thompson at Bell Labs in 1970. Ken used B to write one of the first implementations of UNIX. B in turn was a descendant of the language BCPL (developed at Cambridge (UK) in 1967), with most of its instructions removed.
So many instructions were removed in going from BCPL to B, that Dennis Ritchie of Bell Labs put some back in (in 1972), and called the language C.
The famous book The C Programming Language was written by Kernighan and Ritchie in 1978, and was the definitive reference book on C for almost a decade.
The original C was still too limiting, and not standardized, and so in 1983, an ANSI committee was established to formalize the language definition.
It has taken until now (ten years later) for the ANSI ( American National Standard Institute) standard to become well accepted and almost universally supported by compilers.
The C++ Programming Language is basically an extension of the C Programming Language. The C Programming language was developed from 1969-1973 at Bell labs, at the same time the UNIX operating system was being developed there. C was a direct descendant of the language B, which was developed by Ken Thompson as a systems programming language for the fledgling UNIX operating system. B, in turn, descended from the language BCPL which was designed in the 1960s by Martin Richards while at MIT.
In 1971 Dennis Ritchie at Bell Labs extended the B language (by adding types) into what he called NB, for "New B". Ritchie credits some of his changes to language constructs found in Algol68, although he states "although it [the type scheme], perhaps, did not emerge in a form that Algol's adherents would approve of" After restructuring the language and rewriting the compiler for B, Ritchie gave his new language a name: "C".
C Programming
History of C Programming
Features of C Programming
More about C Programming
Advantages of C Programming
Disadvantages of C Programming
Write using C programming
This PPT is for First year engineering student,It covered all about C Programming according to Rajastha Technical University Kota.
flowchart, pseudo code, Programming Languages and Language Translators, Identifiers, Constants, Variables, Basic Data Types, Operators, Expressions, type casting, Input / Output Statement, Scope Rules and Storage classes, Preprocessor and Macro Substitution.
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
Std 10 computer chapter 10 introduction to c language (part1) by Nuzhat Memon
Program and Characteristics of Program
Need of Programming Language
Need of Translator
History of C Language
Features of C Language
First Program in C Language
Structure of C Language (Documentation Section, Symbolic Constant Definition, File Include Section, Global Variable or Declaration Section, Main Function, User Defined Function)
Execution of C Program (Source code, Compiler, Object code, Linker, Executable code, Loader)
At the end of this lecture students should be able to;
Describe features of C programming language.
Justify the terminology related to computer programming.
Define the editing, compiling, linking, debugging stages of C programming
Recognize the basic structure of a C program
Apply comments for C programs to improve readability.
The C++ Programming Language is basically an extension of the C Programming Language. The C Programming language was developed from 1969-1973 at Bell labs, at the same time the UNIX operating system was being developed there. C was a direct descendant of the language B, which was developed by Ken Thompson as a systems programming language for the fledgling UNIX operating system. B, in turn, descended from the language BCPL which was designed in the 1960s by Martin Richards while at MIT.
In 1971 Dennis Ritchie at Bell Labs extended the B language (by adding types) into what he called NB, for "New B". Ritchie credits some of his changes to language constructs found in Algol68, although he states "although it [the type scheme], perhaps, did not emerge in a form that Algol's adherents would approve of" After restructuring the language and rewriting the compiler for B, Ritchie gave his new language a name: "C".
C Programming
History of C Programming
Features of C Programming
More about C Programming
Advantages of C Programming
Disadvantages of C Programming
Write using C programming
This PPT is for First year engineering student,It covered all about C Programming according to Rajastha Technical University Kota.
flowchart, pseudo code, Programming Languages and Language Translators, Identifiers, Constants, Variables, Basic Data Types, Operators, Expressions, type casting, Input / Output Statement, Scope Rules and Storage classes, Preprocessor and Macro Substitution.
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
Std 10 computer chapter 10 introduction to c language (part1) by Nuzhat Memon
Program and Characteristics of Program
Need of Programming Language
Need of Translator
History of C Language
Features of C Language
First Program in C Language
Structure of C Language (Documentation Section, Symbolic Constant Definition, File Include Section, Global Variable or Declaration Section, Main Function, User Defined Function)
Execution of C Program (Source code, Compiler, Object code, Linker, Executable code, Loader)
At the end of this lecture students should be able to;
Describe features of C programming language.
Justify the terminology related to computer programming.
Define the editing, compiling, linking, debugging stages of C programming
Recognize the basic structure of a C program
Apply comments for C programs to improve readability.
A computer is an electronic device used to process data, converting the data into information that is useful to people.
A computer is a system made of two major components:
hardware and software.
The hardware is the physical equipment.
The software is the collection of programs (instruction) that allow the hardware to do the job.
Computer – Hardware
Hardware represents the physical and tangible components of a computer, i.e. the components that can be seen and touched.
Examples of Hardware are the following −
Input devices − keyboard, mouse, etc.
Output devices − printer, monitor, etc.
Secondary storage devices − Hard disk, CD, DVD, etc.
Internal components − RAM,CPU, motherboard, etc.
INPUT AND OUTPUT DEVICES OF COMPUTER Input Devices A device that can be used to insert data into a computer system is called as input device. It allows people to supply information to computers without any input devices, a computer would only be a display device and not allow users to interact with it, Examples of input devices include keyboards, mouse, scanners, digital cameras and Light pen, joysticks, Touch-screen, OMR, OBR,OCR. Keyboard Most common and very popular input device is keyboard. The keyboard helps in inputting the data to the computer. The layout of the keyboard is like that of traditional typewriter, although there are some additional keys provided for performing some additional functions. Keyboard is of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys keyboard is also available for Windows and Internet. Mouse Mouse is most popular Pointing device. It is a very famous cursor-control device. It is a small palm size box with a round ball at its base which senses the movement of mouse and sends corresponding signals to CPU on pressing the buttons. Generally it has two buttons called left and right button and scroll bar is present at the mid. Mouse can be used to control the position of cursor on screen, but it cannot be used to enter text into the computer.
Computer
A computer is an electronic device, operating under the control of instructions stored in its own memory that can accept data (input), process the data according to specified rules, produce information (output), and store the information for future use.
“A computer is an electronic machine that accepts information, stores it until the information is needed, processes the information according to the instructions provided by the user, and finally returns the results to the user. The computer can store and manipulate large quantities of data at very high speed, but a computer cannot think. A computer makes decisions based on simple comparisons such as one number being larger than another. Although the computer can help solve a tremendous variety of problems, it is simply a machine. It cannot solve problems on its own”.
Characteristics / Features of computer
1: High speed: Computers have the ability to perform routine tasks at a greater speed than human beings. They can perform millions of calculations in seconds.
2. Accuracy : Computers are used to perform tasks in a way that ensures accuracy.
3. Storage : Computers can store large amount of information. Any item of data or any instruction stored in the memory can be retrieved by the computer at lightning speeds.
4. Automation : Computers can be instructed to perform complex tasks automatically ( which increases the productivity).
5. Diligence : Computers can perform the same task repeatedly & with the same accuracy without getting tired.
6. Versatility : Computers are flexible to perform both simple and complex tasks.
7. Cost effectiveness: Computers reduce the amount of paper work and human effort, thereby reducing costs.
Q: What is Technology?
Ans: To convert the knowledge of science into a device or machine is ĐĂůůĞĚ͞dechnology͟.
OR
To invent a device or machine with the help of study of science is called ͞dechnology͘͟
1) COMPUTER TECHNOLOGY:
Computer is an electronic device use
to perform arithmetic and logical operations it accepts data as input process or manipulates the data and give out put which also called information it also has a stored program concept feature so it can save any type of information. It purpose is to speed up problem solving and increase productivity. A computer system is a combination of hardware and software.
2) COMMUNICATION TECHNOLOGY:
Communication technology also called telecommunications technology consists of electromagnetic devices and systems for communicating over long distances. For example: Telephone, radio, broadcast television, and cable T.V etc.
3) INFORMATION TECHNOLOGY:
When computer and communications technologies are combined, the result is Information Technology, or ͞ŝŶĨŽƚĞĐŚ͘͟/ŶĨŽƌŵĂƚŝŽŶdĞĐŚŶŽůŽŐLJ;/dͿŝƐĂŐĞŶĞƌĂůƚĞƌŵƚŚĂƚĚĞƐĐƌŝďĞƐany technology that helps to produce, manipulate, store, communicate, and/or disseminate information. IT merges computing with high-speed
Communications links carrying data, sound, and video. Examples of information technology include personal computers but also new forms of telephones, televisions, appliances, and various handheld devices.
4) TECHNOLOGY CONVERGENCE:
Technology Convergence describes the combining of several industries through various devices that exchange data in the format used by computers. The industries are computers, communications, consumer electronics, entertainment, and mass media. Convergence has led to electronic products that perform multiple functions, such as TVs with internet access, cell phones that are also digital cameras etc.
The computer itself the hardware cannot do anything. The ingredient that enables a computer to perform a specific task is software, which consists of electronic instructions. These instructions tell the machine’s physical components what to do; without them, a computer could not do anything at all.
System Software:
The program directly related to the hardware of the computer and which perform the fundamental task are termed as system software.
Several programs may be included in system software but the following are essential for any computer.
Language Translators
A Particular translator is required to execute any high-level language program.
Each language has a different language translator, while the function of each translator is to convert the high-level program into machine code.
These translators are categorized into the following groups.
Interpreter:
These translators translate only one instruction at a time and execute it. After execution, the translation is erased from memory and the next instruction is loaded for translation. Therefore translation is required again if the program is executed again.
It is a limitation of interpreters that it forgets translation after the execution of the instruction.
A GWBASIC interpreter is required to run GWBASIC programs.
Each programming language has its separate interpreter if it is designed.
Compiler
These translators are used to translate the entire program at once and store their translated program on disk.
The original program is called “Source Program” while its translated program is called “Object Program”.
These translators can not execute an object program.
The object program has to go through some other stages to be able to execute.
Assembler
The assemblers are language translators for low-level symbolic language programs.
Assemblers can translate a source program into an object program.
An assembler translates one source instruction into exactly one machine code.
The linking process is required on the object program to be able to execute it.
Each low-level symbolic language has its assembler.
A typical programming task can be divided into two phases:
Problem-solving phase: produce an ordered sequence of steps that describe the solution of the problem this sequence of steps is called an algorithm.
Implementation phase: implement the program in some programming language.
Every algorithm must satisfy the following criteria:
Input. Zero or more quantities are externally supplied.
Output. At least one quantity is produced.
Definiteness. Each instruction must be clear and unambiguous(Unique meaning).
Finiteness. An algorithm terminates in a finite number of steps.
Effectiveness. Every instruction must be basic enough to be carried out than, means not so complex.
An algorithm is a finite set of steps defining the solution of a particular problem.
What is the difference between an algorithm and a program?
a program is an implementation of an algorithm to be run on a specific computer and operating system.
an algorithm is more abstract – it does not deal with machine-specific details – think of it as a method to solve a problem.
What is a good algorithm?
Efficient algorithms are good, we generally measure the efficiency of an algorithm based on:
Time: the algorithm should take minimum time to execute.
Space: the algorithm should use less memory.
DIFFERENCE BETWEEN ALGORITHM AND PSEUDOCODE?
An algorithm is a well-defined sequence of steps that provides a solution for a given problem, while pseudocode is one of the methods that can be used to represent an algorithm.
While algorithms can be written in natural language, pseudocode is written in a format that is closely related to high-level programming language structures.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages. Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
But pseudocode does not use specific programming language syntax and therefore could be understood by programmers who are familiar with different programming languages.
Additionally, transforming an algorithm presented in pseudocode to programming code could be much easier than converting an algorithm written in natural language.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
3. What is c language:-
C is mother language of all programming
language.
It is system programming language.
It is procedure-oriented programming
language.
It is also called mid level programming
language.
4. A brief history of C
C evolved from a language called B, written by Ken Thompson at Bell Labs in 1970.
Ken used B to write one of the first implementations of UNIX. B in turn was a
descendant of the language BCPL (developed at Cambridge (UK) in 1967), with most
of its instructions removed.
So many instructions were removed in going from BCPL to B, that Dennis Ritchie of
Bell Labs put some back in (in 1972), and called the language C.
The famous book The C Programming Language was written by Kernighan and
Ritchie in 1978, and was the definitive reference book on C for almost a decade.
The original C was still too limiting, and not standardized, and so in 1983 an ANSI
committee was established to formalise the language definition.
It has taken until now (ten years later) for the ANSI ( American National Standard
Institute) standard to become well accepted and almost universally supported by
compilers
5. Language year Developed By
ALGOL 1960 InternationalGroup
BPCL 1967 Martin Richards
B 1970 Ken Thompson
Traditional C 1972 Dennis Ritchie
K & R C 1978 Kernighan &Dennis Ritchie
ANSI C 1989 ANSI Committee
ANSI/ISOC 1990 ISO Committee
C99 1999 Standardization
Committee
Summary of C language history
6. Features ofC
The main features of C is; It is Structure oriented
programming languageand it isaverysimpleandeasy
languageztoreadandwrite,
9. IDE: The Integrated Development Environment
Turbo c features as integrated Development
environment, or IDE,. It is also referred to as the
programmer’s platform.) in IDE you can able to
write/save/open your programs or code, compile
using short cut keys, and also perform code
debugging very easily.
10.
11. Common Short cut Keys Description
F2 press to Save current work
F3 press to open an existing file
ALT-F3 press to close current
ALT-F9 press to compile only
ALT-F5 press to view the desired output of the
program.
CTRL-F9 press to compile+run
ALT-X or ALT-F-X press to exit from TC IDE
IDE: The Integrated Development Environment
12. C Programs STRUCTURE (General)
<Preprocessor Directives (some time necessary)>
<Macros Definition (optional)>
<function declaration>
< Global Variable (on your demand)>
main () (Necessary)
{ statements }
< function definition>
{ }
13. Remember Some common rules for writing C
program
Use all commands or statements in lower or small case.
After completion of a statement excluding main() or loops must
insert ; (semicolon) as a statement terminator.
Don’t use/declare identifier or variable name same as statement
name suppose int
include; this is a wrong statement because include has a special
meaning in the language.
16. Compiling & Executing C Programs
C compiler: This program translates the C language source code
into the machine assembly language.
Assembler: The assembler accepts the C – compiler output and
creates object code. If the program does not contain any external
function calls, this code is directly executable.
Linker: If a source file references library functions, which is
defined in other source files, the linker combines these functions
with the main() function to create an executable program file.
17. C Program: Steps
Step 1: The program that is to be compiled is first typed into a
file on the computer system. There are various conventions that
are used for naming files, typically be any name provided the last
two characters are “.c” or file with extension .c. So, the file name
prog1.c might be a valid filename for a C program. The program
that is entered into the file
is known as the source program because it represents the
original form of the program expressed in the C language.
18. C Program: Steps
Step 2: After the source program has been entered
into a file, then proceed to have it compiled.
Typical errors reported during this phase of
compilation might be due to an expression that has
unbalanced parentheses (syntactic error), or due to
the use of a variable that is not “defined” (semantic
error).
19. C Program: Steps
Step 3: When all the syntactic and semantic errors
have been removed from the program, the compiler
then proceeds to take each statement of the program
and translate it into a “lower” form that is equivalent
to assembly language program needed to perform
the identical task.
20. C Program: Steps
Step 4: After the program has been translated the
next step in the compilation process is to translate
the assembly language statements into actual
machine instructions. The assembler takes each
assembly language statement and converts it into a
binary format known as object code, which is then
written into another file on the system. This file has
the same name as the source file under Unix, with
the last letter an “o” (for object) instead of a “c”.
21. C Program: Steps
Step 5: After the program has been translated into
object code, it is ready to be linked. This process is
once again performed automatically whenever the cc
or gcc command is issued under Unix. The purpose
of the linking phase is to get the program into a final
form for execution on the computer.
22. C Program: Steps
Step 6: The final linked file, which is in an
executable object code format, is stored in another
file on the system, ready to be run or executed..
23. Header Files or Preprocessor Directives
C preprocessor: This program accepts C source files as input and
produces a file that is passed to the compiler.
The preprocessor is responsible for removing comments and interpreting
special C language pre-processor directives, which can be easily
identified as they begin with the # symbol.
# include: The preprocessor adds the information about the object code
used in the body of the main function. These files are called headerfiles.
# define: this directive assigns a symbolic name to a constant.
Symbolic names are used to make programs more readable and
maintainable.
24. Header Files or Preprocessor Directives
Header Files or Preprocessor Directives contains references or links of
library functions. That is built-in in the C language.
Suppose if you want to use a function clrscr() ; in the main function so must be
declared on top # include <conio.h> other wise you could have an prototype error.
Some header files are as follows
Stdio.h
Conio.h
Dos.h
String.h
math.h
And many more header files are available in C…
25. Main() function: void main(void)
Every C programs consists of one or more functions. No
matter how many functions there are in a C program , main
is the one to which control is passed from the operating
system when the program is run ; it is the first function
executed.
The word "void" preceding "main" specifies that the function
main() will not return a value.
The second "void," in parenthesis , specifies that the
function takes no arguments.
26. printf() function
printf() is built-in function we can display with
printf() any message, variable value on
screen/file/printer.
In printf() we can use many escape
sequences and format specifies.
27. First Program of C Language:-
#include <stdio.h>
#include <conio.h>
void main(){
printf("Hello CLanguage");
getch();
}
29. Describe theC Program:-
#include <stdio.h> includes the standard input
output library functions. The printf() function is defined in
stdio.h .
#include <conio.h> includes the console input
output library functions. The getch() function is defined in
conio.h file.
void main() The main() function is the entry point of
every program in c language. The void keyword specifies
that it returns no value.
printf() The printf() function is used to print data on the
console.
getch() The getch() function asks for a single
character. Until you press any key, it blocks the screen.
30. Escape sequences
Escape sequences are special notations through which we can display our data Variety of
ways:
Some escape sequences and their functions are as follows:
Perform line feed (new line ) & Carriage return operation printf("AnB");
Escape Sequence Description Example
n
t
’
“
r
b
Prints a tab sequence on screen printf ("Atb");
Prints a single quote character on screen printf ("’a’");
Prints a double quote character on Screen printf (""a"");
Perform carriage return operation printf ("arb")
Remove one character from left printf ("abHi!" );
31. Escape Sequence
Program of CLanguage:-
#include <stdio.h>
#include <conio.h>
void main(void)
{
clrscr();
printf( " " C Language" n");
getch();
}
Output:
" C Language "
33. Rules for Comment
Comments : code which are not executable statement, of
necessary can be placed in between /* and */.
Comment in the program should be enclosed within /* .. */ .Look example below
the first line is comment.
For ex. /*This my first program*/
#include<stdio.h>
main()
{
Statement;
Statement;
}
34. Rules for Comment
Though comments are not necessary, but it good practice to begin programwith
comment indicating purpose of program so that other person can get idea of
program.
You can write any number comment at any place in program mentioning the
purpose of the statement.
Use few Comment instead of too many.
A comment cannot be nested. For ex., /* The/*first/*program*/*/*/.
// use for single line comment and /* */ multiple line
A comment can split over more than one line. Forex.
/*THE
First
Program*/
37. C Programming Error Types – Runtime,
Compile & Logical Errors
While writing c programs, errors also known as bugs in the world
of programming may occur unwillingly which may prevent the
program to compile and run correctly as per the expectation of
the programmer.
Basically there are three types of errors in c programming:
Runtime Errors
Compile Errors
Logical Errors
38. C Runtime Errors
C runtime errors are those errors that occur during the
execution of a c program and generally occur due to some
illegal operation performed in the program.
Examples of some illegal operations that may produce
runtime errors are:
Dividing a number by zero
Trying to open a file which is not created
Lack of free memory space
39. Compile Errors
Compile errors are those errors that occur at the time of compilation
of the program. C compile errors may be further classified as:
Syntax Errors
When the rules of the c programming language are not followed,
the compiler will show syntax errors.
For example, consider the statement:
int a,b:
The above statement will produce syntax error as the statement is
terminated with : rather than ;
40. Compile Errors
Semantic Errors
Semantic errors are reported by the compiler when the
statements written in the c program are not meaningful to the
compiler.
For example, consider the statement,
b+c=a;
In the above statement we are trying to assign value of a in the
value obtained by summation of b and c which has no meaning
in c. The correct statement will be
a=b+c;
41. Logical Errors
Logical errors are the errors in the output of the
program. The presence of logical errors leads to
undesired or incorrect output and are caused due to
error in the logic applied in the program to produce the
desired output.
Also, logical errors could not be detected by the
compiler, and thus, programmers has to check the
entire coding of a c program line by line.