SlideShare a Scribd company logo
C language Myth & Secrets.
By,
Ankush Mundhra
BCA II year
Contents
 Introduction
 History of C
• Its early development
• K&R C
• C language standards
 Myths & Secrets
 Experiment
 Q & A
Introduction
 What is C language ?
 C is a high-level and general purpose programming
language that is ideal for developing firmware or
portable applications. Originally intended for writing
system software, C was developed at Bell Labs by
Dennis Ritchie for the Unix Operating System (OS) in
the early 1970s.
of C language -
 Simple
 Portability
 Powerful
 Case sensitive
 Modularity
 Use of Pointers
History of C language
 Its early developments -
 C language was invented for implementing
UNIX operating system.
 The C programming language is a structure
oriented programming language,
developed at Bell Laboratories in 1972 by
Dennis Ritchie.
 C programming language features were
derived from an earlier language called
“B” (Basic Combined Programming
Language – BCPL).
Ken Thompson & Dennis Ritchie
 K&R C -
In 1978, Brian Kernighan and Dennis Ritchie published the
first edition of ”The C Programming Language”. This
book, known to C programmers as "K&R", served for many
years as an informal specification of the language.
K&R introduced several language features:
 Standard I/O library
 Long int data type
 Unsigned int data type
In the years following the publication of K&R C, several
features were added to the language, supported by
compilers from AT&T and some other vendors. These
included:
 Void functions
 Assignment for struct data types
 Enumerated types
 Functions returning struct or union types
 C Language Standards -
• C89/C90 standard –
First standardized specification for C language was developed
by the American National Standards Institute in 1989. C89 and
C90 standards refer to the same programming language.
• C99 standard –
Next revision was published in 1999 that introduced new
features like advanced data types and other changes.
C11 AND EMBEDDED C LANGUAGE –
• C11 standard adds new features to C programming language
and library like type generic macros, anonymous structures,
improved Unicode support, atomic operations, multi-
threading and bounds-checked functions. It also makes some
portions of the existing C99 library optional and improves
compatibility with C++.
• Embedded C includes features not available in C like fixed-
point arithmetic, named address spaces, and basic I/O
hardware addressing.
• Operating systems, C compiler and all UNIX application
programs are written in C language
• It is also called as procedure oriented programming language.
The C language is reliable, simple and easy to use. C has been
coded in assembly language.
Myths & Secrets
“ C is quirky, flawed, and an enormous success.”
- Dennis Ritchie
1) C is obsolete.
No one uses C anymore!
It is true that C is the Latin of programming
languages and that recent languages are more
flexible and let us do amazing stuff with ease.
However, most of these languages have emerged
from C. They have been built with C as their base.
2) C++ is better than C.
There are two versions of everything these days,
exactly like C and C++. C is like the 5-inch version
of a smartphone and C++ is its 6-inch variant. Both
pack almost same features with a few
modifications here and there. Whatever you
achieve with C, you can achieve with C++.
Similarly, whatever you can make in C++, you can
also make that with C.
3) C++ is the next version of C!
People say C++ is the next version of C, which
technically it is NOT, not even close! The term
“version” comes into picture when we are dealing
with the same thing, for example, Windows 8,
Windows 8.1 and so on. In the case of C and C++,
they are two different languages. It’s true that
they are built on the same base, but they can’t
technically be called “versions” as such.
4) Arrays start at 0 rather than 1.
Most people start counting at 1, rather than zero. Compiler writers
start with zero because we're used to thinking in terms of offsets.
This is sometimes tough on non-compiler-writers; although a[100]
appears in the definition of an array, we would better not store any
data at a[100], since a[0] to a[99] is the extent of the array.
5) No nested functions.
Function contained inside another function is known
as nested function. This simplifies the
compiler and slightly speeds up the runtime
organization of C programs.
Experiments
1) Difference in data types sizes in GCC and in Turbo
compiler.
Here is the code -
#include<stdio.h>
int main()
{
int *p;
printf("%dn", sizeof(int));
printf("%dn", sizeof(char));
printf("%dn", sizeof(float));
printf("%dn", sizeof(double));
printf("%dn", sizeof(p));
return 0;
}
After Compiling the above code,
Here is the output -
GCC Compiler Turbo C Compiler
2. Difference in output in Increment Decrement operator.
Here is the code -
#include<stdio.h>
int main()
{
int i=5;
printf("%d%d%d%d%d",i++,i--,++i,--i,i);
return 0;
}
After Compiling the above code,
Here is the output -
GCC Compiler Turbo C Compiler
Reference
 Wikipedia
 Google
 Quora
 Arihant All-in-One Computer Science book
 Bibhudendu Panda Sir
C language myths & secrets
C language myths & secrets

More Related Content

PDF
History of C/C++ Language
PPTX
History of C Programming Language
PPT
Lecture 1- History of C Programming
PPTX
Introduction to c programming
PPT
History of c
PPTX
Programming in c (history of c)
PPT
1. over view and history of c
History of C/C++ Language
History of C Programming Language
Lecture 1- History of C Programming
Introduction to c programming
History of c
Programming in c (history of c)
1. over view and history of c

What's hot (19)

PPTX
Introduction to c language | History of C language
PDF
Lecture 2 history_of_c
PPTX
Introduction to c programming
PPTX
C Language
PPTX
C++ history session 00 history
PPTX
History of c programming language.
PPTX
C++ language
PPTX
Introduction to C Language
PDF
C++ vs python
PPTX
Introduction to C Language
PDF
Lecture # 1
PPTX
Python vs c++ ppt
PPTX
C Programming Language
PPTX
C programming short notes by pulkit modi
PDF
C++ vs python the best ever comparison
PDF
Doppl development iteration #10
PPTX
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
PPTX
1 introduction to c programming language
PPT
Introduction to c_language
Introduction to c language | History of C language
Lecture 2 history_of_c
Introduction to c programming
C Language
C++ history session 00 history
History of c programming language.
C++ language
Introduction to C Language
C++ vs python
Introduction to C Language
Lecture # 1
Python vs c++ ppt
C Programming Language
C programming short notes by pulkit modi
C++ vs python the best ever comparison
Doppl development iteration #10
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
1 introduction to c programming language
Introduction to c_language
Ad

Similar to C language myths & secrets (20)

PPTX
C programming orientation
DOCX
C Unit 1 notes PREPARED BY MVB REDDY
DOC
Introduction to C Programming - TCCI.doc
PPTX
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
DOCX
What is C.docx
PPTX
Summer training PPT Manasv Singharia.pptx
PPT
Why C is Called Structured Programming Language
PPTX
Ch1 Introducing C
PPTX
C-PROGRAMMING-LANGUAGE.pptx
PDF
Learn c programming language in 24 hours allfreebooks.tk
PPTX
c programming, internshala training , govt engineering college aurangabad
PPTX
20210417-cppRelevancy-DataStructures.pptx
PPTX
Unit-1_c.pptx you from the heart of the day revision
PPTX
Introduction to C Programming Language
PDF
Best C Programming Training & Coaching in Ambala
PPTX
Lecture 1-introduction to c
PPTX
introduction to c
DOCX
Fundamentals of programming and problem solving
DOCX
all languages in computer programming
C programming orientation
C Unit 1 notes PREPARED BY MVB REDDY
Introduction to C Programming - TCCI.doc
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
What is C.docx
Summer training PPT Manasv Singharia.pptx
Why C is Called Structured Programming Language
Ch1 Introducing C
C-PROGRAMMING-LANGUAGE.pptx
Learn c programming language in 24 hours allfreebooks.tk
c programming, internshala training , govt engineering college aurangabad
20210417-cppRelevancy-DataStructures.pptx
Unit-1_c.pptx you from the heart of the day revision
Introduction to C Programming Language
Best C Programming Training & Coaching in Ambala
Lecture 1-introduction to c
introduction to c
Fundamentals of programming and problem solving
all languages in computer programming
Ad

Recently uploaded (20)

PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PPTX
1. Introduction to Computer Programming.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Big Data Technologies - Introduction.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Tartificialntelligence_presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
SOPHOS-XG Firewall Administrator PPT.pptx
Electronic commerce courselecture one. Pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
1. Introduction to Computer Programming.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Big Data Technologies - Introduction.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Encapsulation_ Review paper, used for researhc scholars
Machine Learning_overview_presentation.pptx
Programs and apps: productivity, graphics, security and other tools
Tartificialntelligence_presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
MYSQL Presentation for SQL database connectivity
Accuracy of neural networks in brain wave diagnosis of schizophrenia

C language myths & secrets

  • 1. C language Myth & Secrets. By, Ankush Mundhra BCA II year
  • 2. Contents  Introduction  History of C • Its early development • K&R C • C language standards  Myths & Secrets  Experiment  Q & A
  • 3. Introduction  What is C language ?  C is a high-level and general purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System (OS) in the early 1970s.
  • 4. of C language -  Simple  Portability  Powerful  Case sensitive  Modularity  Use of Pointers
  • 5. History of C language  Its early developments -  C language was invented for implementing UNIX operating system.  The C programming language is a structure oriented programming language, developed at Bell Laboratories in 1972 by Dennis Ritchie.  C programming language features were derived from an earlier language called “B” (Basic Combined Programming Language – BCPL). Ken Thompson & Dennis Ritchie
  • 6.  K&R C - In 1978, Brian Kernighan and Dennis Ritchie published the first edition of ”The C Programming Language”. This book, known to C programmers as "K&R", served for many years as an informal specification of the language. K&R introduced several language features:  Standard I/O library  Long int data type  Unsigned int data type In the years following the publication of K&R C, several features were added to the language, supported by compilers from AT&T and some other vendors. These included:  Void functions  Assignment for struct data types  Enumerated types  Functions returning struct or union types
  • 7.  C Language Standards - • C89/C90 standard – First standardized specification for C language was developed by the American National Standards Institute in 1989. C89 and C90 standards refer to the same programming language. • C99 standard – Next revision was published in 1999 that introduced new features like advanced data types and other changes.
  • 8. C11 AND EMBEDDED C LANGUAGE – • C11 standard adds new features to C programming language and library like type generic macros, anonymous structures, improved Unicode support, atomic operations, multi- threading and bounds-checked functions. It also makes some portions of the existing C99 library optional and improves compatibility with C++. • Embedded C includes features not available in C like fixed- point arithmetic, named address spaces, and basic I/O hardware addressing. • Operating systems, C compiler and all UNIX application programs are written in C language • It is also called as procedure oriented programming language. The C language is reliable, simple and easy to use. C has been coded in assembly language.
  • 9. Myths & Secrets “ C is quirky, flawed, and an enormous success.” - Dennis Ritchie
  • 10. 1) C is obsolete. No one uses C anymore! It is true that C is the Latin of programming languages and that recent languages are more flexible and let us do amazing stuff with ease. However, most of these languages have emerged from C. They have been built with C as their base.
  • 11. 2) C++ is better than C. There are two versions of everything these days, exactly like C and C++. C is like the 5-inch version of a smartphone and C++ is its 6-inch variant. Both pack almost same features with a few modifications here and there. Whatever you achieve with C, you can achieve with C++. Similarly, whatever you can make in C++, you can also make that with C.
  • 12. 3) C++ is the next version of C! People say C++ is the next version of C, which technically it is NOT, not even close! The term “version” comes into picture when we are dealing with the same thing, for example, Windows 8, Windows 8.1 and so on. In the case of C and C++, they are two different languages. It’s true that they are built on the same base, but they can’t technically be called “versions” as such.
  • 13. 4) Arrays start at 0 rather than 1. Most people start counting at 1, rather than zero. Compiler writers start with zero because we're used to thinking in terms of offsets. This is sometimes tough on non-compiler-writers; although a[100] appears in the definition of an array, we would better not store any data at a[100], since a[0] to a[99] is the extent of the array. 5) No nested functions. Function contained inside another function is known as nested function. This simplifies the compiler and slightly speeds up the runtime organization of C programs.
  • 14. Experiments 1) Difference in data types sizes in GCC and in Turbo compiler. Here is the code - #include<stdio.h> int main() { int *p; printf("%dn", sizeof(int)); printf("%dn", sizeof(char)); printf("%dn", sizeof(float)); printf("%dn", sizeof(double)); printf("%dn", sizeof(p)); return 0; }
  • 15. After Compiling the above code, Here is the output - GCC Compiler Turbo C Compiler
  • 16. 2. Difference in output in Increment Decrement operator. Here is the code - #include<stdio.h> int main() { int i=5; printf("%d%d%d%d%d",i++,i--,++i,--i,i); return 0; }
  • 17. After Compiling the above code, Here is the output - GCC Compiler Turbo C Compiler
  • 18. Reference  Wikipedia  Google  Quora  Arihant All-in-One Computer Science book  Bibhudendu Panda Sir