SlideShare a Scribd company logo
1 of 20
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

What's hot

Introduction to c language | History of C language
Introduction to c language | History of C languageIntroduction to c language | History of C language
Introduction to c language | History of C languagesimplidigital
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_ceShikshak
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingSivant Kolhe
 
C++ history session 00 history
C++ history session 00   historyC++ history session 00   history
C++ history session 00 historyArun Prakash
 
History of c programming language.
History of c programming language.History of c programming language.
History of c programming language.Md Khalid Hasan
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C LanguageTarun Sharma
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C LanguageKamal Acharya
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modiPulkitmodi1998
 
C++ vs python the best ever comparison
C++ vs python the best ever comparison C++ vs python the best ever comparison
C++ vs python the best ever comparison calltutors
 
Doppl development iteration #10
Doppl development   iteration #10Doppl development   iteration #10
Doppl development iteration #10Diego Perini
 
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTREC & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTREjatin batra
 
1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming languageNarendra Soni
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_languageWay2itech
 

What's hot (19)

Introduction to c language | History of C language
Introduction to c language | History of C languageIntroduction to c language | History of C language
Introduction to c language | History of C language
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_c
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C Language
C LanguageC Language
C Language
 
C++ history session 00 history
C++ history session 00   historyC++ history session 00   history
C++ history session 00 history
 
History of c programming language.
History of c programming language.History of c programming language.
History of c programming language.
 
C++ language
C++ languageC++ language
C++ language
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
C++ vs python
C++ vs pythonC++ vs python
C++ vs python
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
Lecture # 1
Lecture # 1Lecture # 1
Lecture # 1
 
Python vs c++ ppt
Python vs c++ pptPython vs c++ ppt
Python vs c++ ppt
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modi
 
C++ vs python the best ever comparison
C++ vs python the best ever comparison C++ vs python the best ever comparison
C++ vs python the best ever comparison
 
Doppl development iteration #10
Doppl development   iteration #10Doppl development   iteration #10
Doppl development iteration #10
 
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTREC & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
 
1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming language
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
 

Similar to C language myths & secrets

C programming orientation
C programming orientationC programming orientation
C programming orientationnikshaikh786
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREjatin batra
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxshokeenk14
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming LanguageSinbad Konick
 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxDhirendraShahi2
 
Learn c programming language in 24 hours allfreebooks.tk
Learn c programming language in 24 hours   allfreebooks.tkLearn c programming language in 24 hours   allfreebooks.tk
Learn c programming language in 24 hours allfreebooks.tkragulasai
 
c programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadc programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadPysh1
 
20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptxSuman Garai
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageRamaBoya2
 
Best C Programming Training & Coaching in Ambala
Best C Programming Training & Coaching in AmbalaBest C Programming Training & Coaching in Ambala
Best C Programming Training & Coaching in Ambalajatin batra
 
Lecture 1-introduction to c
Lecture 1-introduction to cLecture 1-introduction to c
Lecture 1-introduction to cMuktadir Shoaib
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solvingJustine Dela Serna
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programminghamza239523
 
Lecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxLecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxMdMuaz2
 

Similar to C language myths & secrets (20)

C programming orientation
C programming orientationC programming orientation
C programming orientation
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
What is C.docx
What is C.docxWhat is C.docx
What is C.docx
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
 
Ch1 Introducing C
Ch1 Introducing CCh1 Introducing C
Ch1 Introducing C
 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptx
 
c.pdf
c.pdfc.pdf
c.pdf
 
Learn c programming language in 24 hours allfreebooks.tk
Learn c programming language in 24 hours   allfreebooks.tkLearn c programming language in 24 hours   allfreebooks.tk
Learn c programming language in 24 hours allfreebooks.tk
 
c programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadc programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabad
 
20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
Best C Programming Training & Coaching in Ambala
Best C Programming Training & Coaching in AmbalaBest C Programming Training & Coaching in Ambala
Best C Programming Training & Coaching in Ambala
 
introduction to c
introduction to cintroduction to c
introduction to c
 
Lecture 1-introduction to c
Lecture 1-introduction to cLecture 1-introduction to c
Lecture 1-introduction to c
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
 
Lecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxLecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptx
 
Introduction of 'C' langauge
Introduction of  'C'  langaugeIntroduction of  'C'  langauge
Introduction of 'C' langauge
 

Recently uploaded

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

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