SlideShare a Scribd company logo
C –Imp Points
K.Taruni
The C Character Set
Alphabets

A, B, ….., Y, Z
a, b, ……, y, z

Digits

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Special symbols

~‘!@#%^&*()_-+=|{}
[]:;"'<>,.?/

 The alphabets, numbers and special symbols when properly combined form constants, variables
and keywords.
 A constant is an entity that doesn‟t change whereas a variable is an entity that may change.
C stores values at memory locations which are
given a particular name.

x

3

x

5

 Since the location whose name is x can hold different values at different times x is
known as a variable. As against this, 3 or 5 do not change, hence are known as constants.
 A character constant is a single alphabet, a single digit or a single special symbol enclosed within
single inverted commas. Both the inverted commas should point to the left.
 For example, ‟A‟ is a valid character constant whereas „A‟ is not.
Following rules must be observed while constructing real
constants expressed in exponential form:





The mantissa part and the exponential part should be separated by a letter e.
The mantissa part may have a positive or negative sign.
Default sign of mantissa part is positive.
The exponent must have at least one digit, which must be a positive or negative integer. Default sign is
positive.

 Range of real constants expressed in exponential form is -3.4e38 to 3.4e38.
 Ex.: +3.2e-5
4.1e8
-0.2e+3

-3.2e-5
Rules for Constructing Variable Names
 A variable name is any combination of 1 to 31 alphabets, digits or underscores.
Some compilers allow variable names whose length could be up to 247
characters. Still, it would be safer to stick to the rule of 31 characters. Do not
create unnecessarily long variable names as it adds to your typing effort.
 The first character in the variable name must be an alphabet or underscore.
 No commas or blanks are allowed within a variable name.
 No special symbol other than an underscore (as in gross_sal) can be used in a
variable name.
C Keywords-cannot be used as variable names
 The keywords are also called „Reserved words‟.
 There are only 32 keywords available in C.
 Note that compiler vendors (like Microsoft,
Borland, etc.) provide their own keywords apart
from the ones mentioned above. These include
extended keywords like near, far, asm, etc.
 Though it has been suggested by the ANSI
committee that every such compiler specific
keyword should be preceded by two
underscores (as in __asm ), not every vendor
follows this rule.
C Program
 C has no specific rules for the position at which a statement is to be written. That‟s why it






is often called a free-form language.
Every C statement must end with a ;. Thus ; acts as a statement terminator.
The statements in a program must appear in the same order in which we wish them to be
executed; unless of course the logic of the problem demands a deliberate „jump‟ or
transfer of control to a statement, which is out of sequence.
Blank spaces may be inserted between two words to improve the readability of the
statement. However, no blank spaces are allowed within a variable, constant or keyword.
All statements are entered in small case letters.
/* Calculation of simple interest */
/* Author gekay Date: 25/05/2004 */

C Program

main( )
{
int p, n ;
float r, si ;
p = 1000 ;
n=3;
r = 8.5 ;
/* formula for simple interest */

 Comments cannot be nested. For example,
/* Cal of SI /* Author sam date 01/01/2002
*/ */

is invalid.

 −A comment can be split over more than
one line, as in,

 /* This is

si = p * n * r / 100 ;

a jazzy

printf ( "%f" , si ) ;

comment */

}
/* Just for fun. Author: Bozo */

main( )
{
int num ;
printf ( "Enter a number" ) ;

 Type declaration instruction −

To declare the
type of variables used in a C program.

scanf ( "%d", &num ) ;

 Arithmetic instruction −
printf ( "Now I am letting you on a secret..." ) ;
printf ( "You have just entered the number %d",
num ) ;
}

To perform
arithmetic operations between constants and
variables.

 Control instruction − To control the sequence
of execution of various statements in a C
program.
Type declarations.
 float a = 1.5, b = a + 3.1 ;
is alright, but
 float b = a + 3.1, a = 1.5 ;
is not because we are trying to
use a before it is even declared.

 The following statements would work
 int a, b, c, d ;
a = b = c = 10 ;
 However, the following statement would
not work
int a = b = c = d = 10 ;
 Once again we are trying to use b (to
assign to a) before defining it.
Arithmetic Operations
Ex.: int ad ;
float kot, deta, alpha, beta, gamma ;
ad = 3200 ;
kot = 0.0056 ;
deta = alpha * beta / gamma + 3.2 * 2 /
5;

Here,
*, /, -, + are the arithmetic operators.
= is the assignment operator.
2, 5 and 3200 are integer constants.
3.2 and 0.0056 are real constants.
ad is an integer variable.
kot, deta, alpha, beta, gamma are real
variables.
Arithmetic Statement – 3 types
Integer mode arithmetic statement This is an arithmetic statement in which
all operands are either integer variables
or integer constants.
Ex.: int i, king, issac, noteit ;
i=i+1;
king = issac * 234 + noteit - 7689 ;

Real mode arithmetic statement - This is
an arithmetic statement in which all
operands are either real constants or real
variables. Ex.: float qbee, antink, si,
prin, anoy, roi ;
qbee = antink + 23.123 / 4.5 * 0.3442 ;
si = prin * anoy * roi / 100.0 ;

 Mixed mode arithmetic statement - This is an arithmetic statement in which
some of the operands are integers and some of the operands are real.
Arithmetic Instructions
Ex.: float si, prin, anoy, roi, avg ;
int a, b, c, num ;
si = prin * anoy * roi / 100.0 ;
avg = ( a + b + c + num ) / 4 ;

 An arithmetic instruction is often used for
storing character constants in character
variables.

char a, b, d ;
a = 'F' ;
b = 'G' ;
d = '+' ;

 C allows only one variable on left-hand side
of =. That is, z = k * l is legal, whereas k * l =
z is illegal.

 In addition to the division operator C also
provides a modular division operator. This
operator returns the remainder on dividing
one integer with another. Thus the expression
10 / 2 yields 5, whereas, 10 % 2 yields 0.
Note that the modulus operator (%) cannot be
applied on a float. Also note that on using %
the sign of the remainder is always same as
the sign of the numerator. Thus –5 % 2 yields
–1, whereas, 5 % -2 yields 1.
Invalid Statements





a = 3 ** 2 ;
b=3^2;
a = c.d.b(xy) usual arithmetic statement
b = c * d * b * ( x * y ) C statement

#include <math.h>
main( )
{
int a ;
a = pow ( 3, 2 ) ;
printf ( “%d”, a ) ;
}

More Related Content

What's hot

CHAPTER 2
CHAPTER 2CHAPTER 2
CHAPTER 2
mohd_mizan
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad baloch
Sarmad Baloch
 
Unit 2 c programming_basics
Unit 2 c programming_basicsUnit 2 c programming_basics
Unit 2 c programming_basics
kirthika jeyenth
 
Introduction
IntroductionIntroduction
Introduction
Komal Pardeshi
 
Pointer in c
Pointer in cPointer in c
Pointer in c
sangrampatil81
 
C Token’s
C Token’sC Token’s
C Token’s
Tarun Sharma
 
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
Pratik Devmurari
 
Compiler notes--unit-iii
Compiler notes--unit-iiiCompiler notes--unit-iii
Compiler notes--unit-iii
Sumathi Gnanasekaran
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
Qazi Shahzad Ali
 
Cpu-fundamental of C
Cpu-fundamental of CCpu-fundamental of C
Cpu-fundamental of C
Suchit Patel
 
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdfPOINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
Rc Os
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
Rai University
 
C++ programming
C++ programmingC++ programming
C++ programming
Anshul Mahale
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tour
Swarup Kumar Boro
 
Basics of c
Basics of cBasics of c
Basics of c
vinothini1996
 
Problem solving with algorithm and data structure
Problem solving with algorithm and data structureProblem solving with algorithm and data structure
Problem solving with algorithm and data structure
Rabia Tariq
 
C programming part4
C programming part4C programming part4
C programming part4
Keroles karam khalil
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 

What's hot (19)

CHAPTER 2
CHAPTER 2CHAPTER 2
CHAPTER 2
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad baloch
 
Unit 2 c programming_basics
Unit 2 c programming_basicsUnit 2 c programming_basics
Unit 2 c programming_basics
 
Introduction
IntroductionIntroduction
Introduction
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
C Token’s
C Token’sC Token’s
C Token’s
 
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
 
Compiler notes--unit-iii
Compiler notes--unit-iiiCompiler notes--unit-iii
Compiler notes--unit-iii
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Cpu-fundamental of C
Cpu-fundamental of CCpu-fundamental of C
Cpu-fundamental of C
 
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdfPOINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
 
C++ programming
C++ programmingC++ programming
C++ programming
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tour
 
Basics of c
Basics of cBasics of c
Basics of c
 
Problem solving with algorithm and data structure
Problem solving with algorithm and data structureProblem solving with algorithm and data structure
Problem solving with algorithm and data structure
 
C programming part4
C programming part4C programming part4
C programming part4
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
 

Viewers also liked

Афиша культурных событий, июль 2013 г.
Афиша культурных событий, июль 2013 г.Афиша культурных событий, июль 2013 г.
Афиша культурных событий, июль 2013 г.Nazarovo_administration
 
Протокол публичных слушаний "Западный"
Протокол публичных слушаний "Западный"Протокол публичных слушаний "Западный"
Протокол публичных слушаний "Западный"Nazarovo_administration
 
Eng
EngEng
Sepember 2012 vol 2
Sepember 2012 vol 2Sepember 2012 vol 2
Sepember 2012 vol 2
thewebmaven
 
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.Nazarovo_administration
 
BackupAgent presentation on Autotask integration
BackupAgent presentation on Autotask integrationBackupAgent presentation on Autotask integration
BackupAgent presentation on Autotask integration
BackupAgent
 
Spss
SpssSpss
ส งคม
ส งคมส งคม
ส งคม280125399
 
положение спартакиада кфк
положение спартакиада кфкположение спартакиада кфк
положение спартакиада кфкNazarovo_administration
 
Tutorial belajar membuat virtualhost di xampp linux
Tutorial belajar membuat virtualhost di xampp linuxTutorial belajar membuat virtualhost di xampp linux
Tutorial belajar membuat virtualhost di xampp linux
Riz Al-Atsary (Abu Uwais)
 
Реестр муниципальных услуг
Реестр муниципальных услугРеестр муниципальных услуг
Реестр муниципальных услугNazarovo_administration
 
Field trips project
Field trips projectField trips project
Field trips project
jaimefoster3
 
План - график создания контейнерных площадок
План - график создания контейнерных площадок План - график создания контейнерных площадок
План - график создания контейнерных площадок Nazarovo_administration
 
How to successfully sell cloud backup
How to successfully sell cloud backupHow to successfully sell cloud backup
How to successfully sell cloud backup
BackupAgent
 
Реестр муниципальных услуг
Реестр муниципальных услугРеестр муниципальных услуг
Реестр муниципальных услугNazarovo_administration
 
Положение конкурса «Конституция Российской Федерации - ориентир для развития...
Положение конкурса «Конституция Российской Федерации -  ориентир для развития...Положение конкурса «Конституция Российской Федерации -  ориентир для развития...
Положение конкурса «Конституция Российской Федерации - ориентир для развития...Nazarovo_administration
 
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
Andrew Ariaratnam
 
Presentation outline!
Presentation outline!Presentation outline!
Presentation outline!
Sandra Vespa
 
Manual wordbasico2010
Manual wordbasico2010Manual wordbasico2010
Manual wordbasico2010
Percy R PH
 

Viewers also liked (20)

Афиша культурных событий, июль 2013 г.
Афиша культурных событий, июль 2013 г.Афиша культурных событий, июль 2013 г.
Афиша культурных событий, июль 2013 г.
 
Протокол публичных слушаний "Западный"
Протокол публичных слушаний "Западный"Протокол публичных слушаний "Западный"
Протокол публичных слушаний "Западный"
 
Eng
EngEng
Eng
 
Sepember 2012 vol 2
Sepember 2012 vol 2Sepember 2012 vol 2
Sepember 2012 vol 2
 
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.
План работы постоянной комиссии по законносте и защите прав граждан на 2014 год.
 
BackupAgent presentation on Autotask integration
BackupAgent presentation on Autotask integrationBackupAgent presentation on Autotask integration
BackupAgent presentation on Autotask integration
 
Spss
SpssSpss
Spss
 
ส งคม
ส งคมส งคม
ส งคม
 
положение спартакиада кфк
положение спартакиада кфкположение спартакиада кфк
положение спартакиада кфк
 
Tutorial belajar membuat virtualhost di xampp linux
Tutorial belajar membuat virtualhost di xampp linuxTutorial belajar membuat virtualhost di xampp linux
Tutorial belajar membuat virtualhost di xampp linux
 
Реестр муниципальных услуг
Реестр муниципальных услугРеестр муниципальных услуг
Реестр муниципальных услуг
 
Field trips project
Field trips projectField trips project
Field trips project
 
План - график создания контейнерных площадок
План - график создания контейнерных площадок План - график создания контейнерных площадок
План - график создания контейнерных площадок
 
How to successfully sell cloud backup
How to successfully sell cloud backupHow to successfully sell cloud backup
How to successfully sell cloud backup
 
Реестр муниципальных услуг
Реестр муниципальных услугРеестр муниципальных услуг
Реестр муниципальных услуг
 
Положение конкурса «Конституция Российской Федерации - ориентир для развития...
Положение конкурса «Конституция Российской Федерации -  ориентир для развития...Положение конкурса «Конституция Российской Федерации -  ориентир для развития...
Положение конкурса «Конституция Российской Федерации - ориентир для развития...
 
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
Mobile Money Transfer : International Remittance Considerations for Mobile Ne...
 
Presentation outline!
Presentation outline!Presentation outline!
Presentation outline!
 
Резолюция. Бюджет.
Резолюция. Бюджет.Резолюция. Бюджет.
Резолюция. Бюджет.
 
Manual wordbasico2010
Manual wordbasico2010Manual wordbasico2010
Manual wordbasico2010
 

Similar to C –imp points

Object Oriented Programming with C++
Object Oriented Programming with C++Object Oriented Programming with C++
Object Oriented Programming with C++
Rokonuzzaman Rony
 
5 introduction-to-c
5 introduction-to-c5 introduction-to-c
5 introduction-to-c
Rohit Shrivastava
 
C Programming
C ProgrammingC Programming
C Programming
Adil Jafri
 
Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variables
Tony Apreku
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
Asirbachan Sutar
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
Muthuselvam RS
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
Ashwini Rao
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++
Muhammad Hammad Waseem
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
WondimuBantihun1
 
Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
Tareq Hasan
 
Basics of c
Basics of cBasics of c
Basics of c
DebanjanSarkar11
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
Muhammad Hammad Waseem
 
Lamborghini Veneno Allegheri #2004@f**ck
Lamborghini Veneno Allegheri #2004@f**ckLamborghini Veneno Allegheri #2004@f**ck
Lamborghini Veneno Allegheri #2004@f**ck
seidounsemel
 
C Programming
C ProgrammingC Programming
C Programming
Raj vardhan
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
JAYA
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
MOHAMAD NOH AHMAD
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
GDGKuwaitGoogleDevel
 
LESSON1-C_programming (1).GRADE 8 LESSONpptx
LESSON1-C_programming (1).GRADE 8 LESSONpptxLESSON1-C_programming (1).GRADE 8 LESSONpptx
LESSON1-C_programming (1).GRADE 8 LESSONpptx
joachimbenedicttulau
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
Mohit Saini
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
Dr.Florence Dayana
 

Similar to C –imp points (20)

Object Oriented Programming with C++
Object Oriented Programming with C++Object Oriented Programming with C++
Object Oriented Programming with C++
 
5 introduction-to-c
5 introduction-to-c5 introduction-to-c
5 introduction-to-c
 
C Programming
C ProgrammingC Programming
C Programming
 
Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variables
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
 
Basics of c
Basics of cBasics of c
Basics of c
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
 
Lamborghini Veneno Allegheri #2004@f**ck
Lamborghini Veneno Allegheri #2004@f**ckLamborghini Veneno Allegheri #2004@f**ck
Lamborghini Veneno Allegheri #2004@f**ck
 
C Programming
C ProgrammingC Programming
C Programming
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
LESSON1-C_programming (1).GRADE 8 LESSONpptx
LESSON1-C_programming (1).GRADE 8 LESSONpptxLESSON1-C_programming (1).GRADE 8 LESSONpptx
LESSON1-C_programming (1).GRADE 8 LESSONpptx
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
 

Recently uploaded

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

C –imp points

  • 2. The C Character Set Alphabets A, B, ….., Y, Z a, b, ……, y, z Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Special symbols ~‘!@#%^&*()_-+=|{} []:;"'<>,.?/  The alphabets, numbers and special symbols when properly combined form constants, variables and keywords.  A constant is an entity that doesn‟t change whereas a variable is an entity that may change.
  • 3. C stores values at memory locations which are given a particular name. x 3 x 5  Since the location whose name is x can hold different values at different times x is known as a variable. As against this, 3 or 5 do not change, hence are known as constants.
  • 4.  A character constant is a single alphabet, a single digit or a single special symbol enclosed within single inverted commas. Both the inverted commas should point to the left.  For example, ‟A‟ is a valid character constant whereas „A‟ is not.
  • 5. Following rules must be observed while constructing real constants expressed in exponential form:     The mantissa part and the exponential part should be separated by a letter e. The mantissa part may have a positive or negative sign. Default sign of mantissa part is positive. The exponent must have at least one digit, which must be a positive or negative integer. Default sign is positive.  Range of real constants expressed in exponential form is -3.4e38 to 3.4e38.  Ex.: +3.2e-5 4.1e8 -0.2e+3 -3.2e-5
  • 6. Rules for Constructing Variable Names  A variable name is any combination of 1 to 31 alphabets, digits or underscores. Some compilers allow variable names whose length could be up to 247 characters. Still, it would be safer to stick to the rule of 31 characters. Do not create unnecessarily long variable names as it adds to your typing effort.  The first character in the variable name must be an alphabet or underscore.  No commas or blanks are allowed within a variable name.  No special symbol other than an underscore (as in gross_sal) can be used in a variable name.
  • 7. C Keywords-cannot be used as variable names  The keywords are also called „Reserved words‟.  There are only 32 keywords available in C.  Note that compiler vendors (like Microsoft, Borland, etc.) provide their own keywords apart from the ones mentioned above. These include extended keywords like near, far, asm, etc.  Though it has been suggested by the ANSI committee that every such compiler specific keyword should be preceded by two underscores (as in __asm ), not every vendor follows this rule.
  • 8. C Program  C has no specific rules for the position at which a statement is to be written. That‟s why it     is often called a free-form language. Every C statement must end with a ;. Thus ; acts as a statement terminator. The statements in a program must appear in the same order in which we wish them to be executed; unless of course the logic of the problem demands a deliberate „jump‟ or transfer of control to a statement, which is out of sequence. Blank spaces may be inserted between two words to improve the readability of the statement. However, no blank spaces are allowed within a variable, constant or keyword. All statements are entered in small case letters.
  • 9. /* Calculation of simple interest */ /* Author gekay Date: 25/05/2004 */ C Program main( ) { int p, n ; float r, si ; p = 1000 ; n=3; r = 8.5 ; /* formula for simple interest */  Comments cannot be nested. For example, /* Cal of SI /* Author sam date 01/01/2002 */ */ is invalid.  −A comment can be split over more than one line, as in,  /* This is si = p * n * r / 100 ; a jazzy printf ( "%f" , si ) ; comment */ }
  • 10. /* Just for fun. Author: Bozo */ main( ) { int num ; printf ( "Enter a number" ) ;  Type declaration instruction − To declare the type of variables used in a C program. scanf ( "%d", &num ) ;  Arithmetic instruction − printf ( "Now I am letting you on a secret..." ) ; printf ( "You have just entered the number %d", num ) ; } To perform arithmetic operations between constants and variables.  Control instruction − To control the sequence of execution of various statements in a C program.
  • 11. Type declarations.  float a = 1.5, b = a + 3.1 ; is alright, but  float b = a + 3.1, a = 1.5 ; is not because we are trying to use a before it is even declared.  The following statements would work  int a, b, c, d ; a = b = c = 10 ;  However, the following statement would not work int a = b = c = d = 10 ;  Once again we are trying to use b (to assign to a) before defining it.
  • 12. Arithmetic Operations Ex.: int ad ; float kot, deta, alpha, beta, gamma ; ad = 3200 ; kot = 0.0056 ; deta = alpha * beta / gamma + 3.2 * 2 / 5; Here, *, /, -, + are the arithmetic operators. = is the assignment operator. 2, 5 and 3200 are integer constants. 3.2 and 0.0056 are real constants. ad is an integer variable. kot, deta, alpha, beta, gamma are real variables.
  • 13. Arithmetic Statement – 3 types Integer mode arithmetic statement This is an arithmetic statement in which all operands are either integer variables or integer constants. Ex.: int i, king, issac, noteit ; i=i+1; king = issac * 234 + noteit - 7689 ; Real mode arithmetic statement - This is an arithmetic statement in which all operands are either real constants or real variables. Ex.: float qbee, antink, si, prin, anoy, roi ; qbee = antink + 23.123 / 4.5 * 0.3442 ; si = prin * anoy * roi / 100.0 ;  Mixed mode arithmetic statement - This is an arithmetic statement in which some of the operands are integers and some of the operands are real.
  • 14. Arithmetic Instructions Ex.: float si, prin, anoy, roi, avg ; int a, b, c, num ; si = prin * anoy * roi / 100.0 ; avg = ( a + b + c + num ) / 4 ;  An arithmetic instruction is often used for storing character constants in character variables. char a, b, d ; a = 'F' ; b = 'G' ; d = '+' ;  C allows only one variable on left-hand side of =. That is, z = k * l is legal, whereas k * l = z is illegal.  In addition to the division operator C also provides a modular division operator. This operator returns the remainder on dividing one integer with another. Thus the expression 10 / 2 yields 5, whereas, 10 % 2 yields 0. Note that the modulus operator (%) cannot be applied on a float. Also note that on using % the sign of the remainder is always same as the sign of the numerator. Thus –5 % 2 yields –1, whereas, 5 % -2 yields 1.
  • 15. Invalid Statements     a = 3 ** 2 ; b=3^2; a = c.d.b(xy) usual arithmetic statement b = c * d * b * ( x * y ) C statement #include <math.h> main( ) { int a ; a = pow ( 3, 2 ) ; printf ( “%d”, a ) ; }