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

C programs
C programsC programs
C programs
Minu S
 
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
Mainak Sasmal
 

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
 

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 ภาษาซีพื้นฐาน

C basics
C basicsC basics
C basics
MSc CST
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
Input output functions
Input output functionsInput output functions
Input output functions
hyderali123
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 

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

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

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