SlideShare a Scribd company logo
1 of 49
LOGO
www.themegallery.com
(Main Menu)
File Edit
Search Run Compile Debug Project
Option Window Help
File

Edit
Search
Run
Debu
g
Proj
ect
Opti
on
Wind
ow
Help

Project

Directories Compiler
Variable)
Charac

Inte
Long Integer)

Flo
Char
Unsigne
dchar
Int
long

ASCII
character (128
-

Float

3.4E-38
E+38

Double

1.7E-308
E+308
C
(Variable
Declaration)
type name;
type :
name :
C

main
#include <stdio.h>
Int main () {
int num;
float y;

char n;
printf("Enter
number : ")
scanf("%d",&num);
printf("Enter
name : ");
scanf("%f",&n);
printf("Thank

num
y

n
A-Z

z
Underscore)
A-Z

a-z

-

a-
Reserved Word)
aut def floa regi
o ault t ster
retu swit
do far
rn
ch
got sho type
char
o
rt def
uni cons enu

str volat brea
uct ile
k
whi
doub
case
le
le
els
signe
if
e
d
size unsig conti
C

bath_r
oom
n-sync
108dot
s
Year#
_good
goto

-
C
(char)
(string)

char
name [n] = "str";
nam
e
n
str
char
name[5]
=
"kwan" ; name
char
year[5]
= "2549";
char

name
kwan

year
year
product_id
A01
1.

int a;
int b
int Com budget
= 30000;
int Com_budget
= 35000;
int _count = 451;
void

Sue's

MAX_ENTRY
return

double
printf

time
xyz123
C
C
-

-
b=a++;
a++
a

b=a;
a=a+1;
a
a
a

b=++a;
a

a=a+1;
b=a;
a-a

b=a--;

b=a;
a
a=a-1;

--

b=--a;
--a

a

a=a-1;
a>b a
b
>==

a >= b
a
b

<
b
<==

a<b a
a <=
x < 60 && x > 50
x
x == 10 || x == 15
x
--

-
1 . 5 + 2 - 3 -2
2 . 5 / 2 - 3.5 * 2 3
3 .8*1/3
4 . - 5 + 4 * (20 %
6)
5 . (-5 * (192 / 3)
7 .8 / 3
8 .8 % 1
9 .7 / 2
10 . 3 * 6 / 5
11 . (5 * 4 )% 3
12 . 6 * ( 9 % 4
1. 2+5
2.13+89
3.2*7-4
4.-34 % 5
5.3 * 7 – ( 6 * 5 / 4 ) + 6
6.
x = 15, y = 23
z=
3.75
6.1
x+y/z
6.2
7/2+x
6.3
15 / 2 + 4 * 5 – z
C

printf
printf
int
float

string
prinft

printf
("format",variab
format
le);
n
t
r
f
b
d
u

f
c
printf
printf("Hello Program C");
Hello
Program C
printf("Lampang kunlayanee
school");
Lampang
kunlayanee school
printf
printf("Lampang Thailand");
Lampang
Thailand

x
printf("total value = %d",x);
#include <stdio.h>
void main()
{
clrscr();
prinft('Lampang
Kunlayanee Schooln");
printf("Program Cn");
getch();
}
Lampang Kunlayanee School
Program C
scanf()
C

scanf()
scanf()

scanf("format",&
variable);
format
printf()
variable
scanf
printf
float score;
float
printf("Enter score : ");

scanf("%d",&score);
score
char answer;
char
printf("Enter Figure (Y : N)
: ")
Y
N
scanf("%c",&answer
answer
char name[10];

printf("Enter your name =
");
scanf("%s",name)
name
#include <stdio.h>
void main()
{
clrscr();
int x,y,sum;
printf("Enter The
Length is : ");
scanf ("%d",&x);
printf("Enter The
Width is : ");
scanf ("%d",&y);
sum = x*y;
printf("The area is
:%d",sum);
1.
int m = 5,n = 8;
printf("%d
%dn",m%n,n%m);
1)
3)

0 1
5 3

2)

1 0
4) 3 5
int c,k
double x,y,z;
x = 1.2;y = 2.1; z = 3.2; c = 3;
z = x + y + z;
k=z/c
printf("%f %f %f %d
%f",x,y,z,k,z/c);

1)
3.

m

n

include <stdio.h>
void main()
{
clrscr();
int m,n;
printf("Enter 2 integers > ");
scanf("%d %d",&m, &n);
m = m+5;
n = 3*n;
printf("m = %dnn= %dn",m,n);
4.
first,second
include <stdio.h>
void main()
{
clrscr();
int ……………… , ………... ,
………………;
printf("Enter
………………………… ");
scanf("%d ",&………);
printf("Enter
………………………… ");
scanf("%d ",&………);
printf("Enter

third
5.

a

include <stdio.h>
void main()
{
clrscr();
int ….. , …….;
printf("Enter
………………………… ");
scanf("%d ",&………);
printf("Enter
………………………… ");
scanf("%d ",&………);
printf(“a+b,%d ",a+b);

b
6.

radius)
area)
circumference)
area = pi * radius * radius
circumference = 2 * pi *
radius
pi


F)
C)
C = (F-32)/1.8


Y

X

Y=



name)
birth year)
LOGO
www.themegallery.com

More Related Content

What's hot (20)

88 c-programs
88 c-programs88 c-programs
88 c-programs
 
StackArray stack3
StackArray stack3StackArray stack3
StackArray stack3
 
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
 
C programms
C programmsC programms
C programms
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
 
C programs
C programsC programs
C programs
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
C
CC
C
 
C PROGRAMS
C PROGRAMSC PROGRAMS
C PROGRAMS
 
First c program
First c programFirst c program
First c program
 
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3
 
week-6x
week-6xweek-6x
week-6x
 
Vcs15
Vcs15Vcs15
Vcs15
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
Let us C (by yashvant Kanetkar) chapter 3 Solution
Let us C   (by yashvant Kanetkar) chapter 3 SolutionLet us C   (by yashvant Kanetkar) chapter 3 Solution
Let us C (by yashvant Kanetkar) chapter 3 Solution
 
C Programming
C ProgrammingC Programming
C Programming
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
week-10x
week-10xweek-10x
week-10x
 

Viewers also liked

เทคโนโลยีสารสนเทศ
เทคโนโลยีสารสนเทศเทคโนโลยีสารสนเทศ
เทคโนโลยีสารสนเทศKrunee Thitthamon
 
10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer ExperienceYuan Wang
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanPost Planner
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting PersonalKirsty Hulse
 

Viewers also liked (8)

เลขฐาน
เลขฐานเลขฐาน
เลขฐาน
 
Blog
BlogBlog
Blog
 
เทคโนโลยีสารสนเทศ
เทคโนโลยีสารสนเทศเทคโนโลยีสารสนเทศ
เทคโนโลยีสารสนเทศ
 
Dev c++using
Dev c++usingDev c++using
Dev c++using
 
10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 

Similar to ภาษาซีพื้นฐาน

Similar to ภาษาซีพื้นฐาน (20)

Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]
 
C basics
C basicsC basics
C basics
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
 
Unit 5 Foc
Unit 5 FocUnit 5 Foc
Unit 5 Foc
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
miniLesson on the printf() function
miniLesson on the printf() functionminiLesson on the printf() function
miniLesson on the printf() function
 
C language
C languageC language
C language
 
Input output functions
Input output functionsInput output functions
Input output functions
 
Input And Output
 Input And Output Input And Output
Input And Output
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
 
Unit 3 Input Output.pptx
Unit 3 Input Output.pptxUnit 3 Input Output.pptx
Unit 3 Input Output.pptx
 
comp2
comp2comp2
comp2
 
C Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossainC Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossain
 
CHAPTER 4
CHAPTER 4CHAPTER 4
CHAPTER 4
 
C language concept with code apna college.pdf
C language concept with code apna college.pdfC language concept with code apna college.pdf
C language concept with code apna college.pdf
 

Recently uploaded

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Recently uploaded (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

ภาษาซีพื้นฐาน