SlideShare uma empresa Scribd logo
1 de 4
Slide 1 of 4Ver. 1.0
Programming in C
In this session, you will do the practice questions of Chapter
1 and Chapter 2.
Objectives
Slide 2 of 4Ver. 1.0
Programming in C
Chapter 1
1. Write a function to accept a character and display it 40
times.
2. Write a function that accepts a number from 0 to 9, along
with a string. The string should then be displayed the
number of times specified.
Slide 3 of 4Ver. 1.0
Programming in C
Chapter 2
1. Write a for loop, which will produce the following output
(Hint: use two nested for loops):
1
22
333
4444
55555
2. Create a C program, which calculates the triangular number
of the user’s request, read from the keyboard using scanf().
A triangular number is the sum of the preceding numbers,
so the triangular number 7 has the value of
7+6+5+4+3+2+1 (same as a factorial in mathematics, for
example, factorial of 7 ---- !7).
Slide 4 of 4Ver. 1.0
Programming in C
Chapter 2
3. Create a C program to check whether the number entered
by user is even or odd.

Mais conteúdo relacionado

Mais procurados

Assignment java workshop
Assignment java workshopAssignment java workshop
Assignment java workshopJaya Jeswani
 
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsVisual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsAditi Bhushan
 
Lecture 1: basic syntax
Lecture 1: basic syntaxLecture 1: basic syntax
Lecture 1: basic syntaxVivek Bhargav
 
Fibonacci Series Program in C++
Fibonacci Series Program in C++Fibonacci Series Program in C++
Fibonacci Series Program in C++Hitesh Kumar
 
Mcs 011 ignou question paper c language
Mcs 011 ignou question paper c languageMcs 011 ignou question paper c language
Mcs 011 ignou question paper c languagewolverine x-man
 
Fibonacci series c++
Fibonacci series c++Fibonacci series c++
Fibonacci series c++Hitesh Kumar
 
Devry cis 115 final exam 3
Devry cis 115 final exam 3Devry cis 115 final exam 3
Devry cis 115 final exam 3shamek1236
 
Devry cis 115 final exam 3
Devry cis 115 final exam 3Devry cis 115 final exam 3
Devry cis 115 final exam 3eyavagal
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9alish sha
 
Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Ramadan Babers, PhD
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12Aditi Bhushan
 
Mean square error
Mean square errorMean square error
Mean square errorJay Patel
 
OP 3014 Assignment 02 Please read about the Fibonacci numbers at http:...
OP 3014  Assignment 02  Please read about the Fibonacci numbers at      http:...OP 3014  Assignment 02  Please read about the Fibonacci numbers at      http:...
OP 3014 Assignment 02 Please read about the Fibonacci numbers at http:...hwbloom39
 
Epc assignment
Epc assignmentEpc assignment
Epc assignmentHồ Lợi
 
AER494 Course: Project No.1
AER494 Course: Project No.1AER494 Course: Project No.1
AER494 Course: Project No.1mohamedrabie90
 
Your first neural network model
Your first neural network modelYour first neural network model
Your first neural network modelAtmaram Naik
 

Mais procurados (19)

Assignment java workshop
Assignment java workshopAssignment java workshop
Assignment java workshop
 
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsVisual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
 
Lecture 1: basic syntax
Lecture 1: basic syntaxLecture 1: basic syntax
Lecture 1: basic syntax
 
Fibonacci Series Program in C++
Fibonacci Series Program in C++Fibonacci Series Program in C++
Fibonacci Series Program in C++
 
Mcs 011 ignou question paper c language
Mcs 011 ignou question paper c languageMcs 011 ignou question paper c language
Mcs 011 ignou question paper c language
 
Fibonacci series c++
Fibonacci series c++Fibonacci series c++
Fibonacci series c++
 
Devry cis 115 final exam 3
Devry cis 115 final exam 3Devry cis 115 final exam 3
Devry cis 115 final exam 3
 
Devry cis 115 final exam 3
Devry cis 115 final exam 3Devry cis 115 final exam 3
Devry cis 115 final exam 3
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
 
Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018
 
Pa1 loops
Pa1 loopsPa1 loops
Pa1 loops
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12
 
Mean square error
Mean square errorMean square error
Mean square error
 
OP 3014 Assignment 02 Please read about the Fibonacci numbers at http:...
OP 3014  Assignment 02  Please read about the Fibonacci numbers at      http:...OP 3014  Assignment 02  Please read about the Fibonacci numbers at      http:...
OP 3014 Assignment 02 Please read about the Fibonacci numbers at http:...
 
4.129 tybsc it
4.129 tybsc it4.129 tybsc it
4.129 tybsc it
 
Exp 1
Exp 1Exp 1
Exp 1
 
Epc assignment
Epc assignmentEpc assignment
Epc assignment
 
AER494 Course: Project No.1
AER494 Course: Project No.1AER494 Course: Project No.1
AER494 Course: Project No.1
 
Your first neural network model
Your first neural network modelYour first neural network model
Your first neural network model
 

Destaque

C programming session 16
C programming session 16C programming session 16
C programming session 16Vivek Singh
 
C programming session 02
C programming session 02C programming session 02
C programming session 02Vivek Singh
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Vivek Singh
 
C programming session 10
C programming session 10C programming session 10
C programming session 10Vivek Singh
 
C programming session 05
C programming session 05C programming session 05
C programming session 05Vivek Singh
 
Sql create table statement
Sql create table statementSql create table statement
Sql create table statementVivek Singh
 

Destaque (6)

C programming session 16
C programming session 16C programming session 16
C programming session 16
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
C programming session 10
C programming session 10C programming session 10
C programming session 10
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Sql create table statement
Sql create table statementSql create table statement
Sql create table statement
 

Semelhante a C programming session 04

C programming session 04
C programming session 04C programming session 04
C programming session 04AjayBahoriya
 
C programming session 08
C programming session 08C programming session 08
C programming session 08Vivek Singh
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy BookAbir Hossain
 
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4Voffelarin
 
Seminar 2 coding_principles
Seminar 2 coding_principlesSeminar 2 coding_principles
Seminar 2 coding_principlesmoduledesign
 
csharp repitition structures
csharp repitition structurescsharp repitition structures
csharp repitition structuresMicheal Ogundero
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdfVcTrn1
 
Bti1022 lab sheet 5
Bti1022 lab sheet 5Bti1022 lab sheet 5
Bti1022 lab sheet 5alish sha
 
Bsc math previous exam quetions
Bsc math previous exam quetionsBsc math previous exam quetions
Bsc math previous exam quetionsmshoaib15
 
Dti2143 lab sheet 4
Dti2143 lab sheet 4Dti2143 lab sheet 4
Dti2143 lab sheet 4alish sha
 
21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)sukeshsuresh189
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...sukeshsuresh189
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to havesukeshsuresh189
 

Semelhante a C programming session 04 (20)

C programming session 04
C programming session 04C programming session 04
C programming session 04
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
Cse cpl manual-2016
Cse cpl manual-2016Cse cpl manual-2016
Cse cpl manual-2016
 
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
 
Pcd201516
Pcd201516Pcd201516
Pcd201516
 
Seminar 2 coding_principles
Seminar 2 coding_principlesSeminar 2 coding_principles
Seminar 2 coding_principles
 
csharp repitition structures
csharp repitition structurescsharp repitition structures
csharp repitition structures
 
Python Manuel-R2021.pdf
Python Manuel-R2021.pdfPython Manuel-R2021.pdf
Python Manuel-R2021.pdf
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdf
 
Bti1022 lab sheet 5
Bti1022 lab sheet 5Bti1022 lab sheet 5
Bti1022 lab sheet 5
 
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORYGE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
 
Bsc math previous exam quetions
Bsc math previous exam quetionsBsc math previous exam quetions
Bsc math previous exam quetions
 
A01
A01A01
A01
 
Dti2143 lab sheet 4
Dti2143 lab sheet 4Dti2143 lab sheet 4
Dti2143 lab sheet 4
 
21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
 

Mais de Vivek Singh

C programming session 14
C programming session 14C programming session 14
C programming session 14Vivek Singh
 
C programming session 13
C programming session 13C programming session 13
C programming session 13Vivek Singh
 
C programming session 11
C programming session 11C programming session 11
C programming session 11Vivek Singh
 
C programming session 07
C programming session 07C programming session 07
C programming session 07Vivek Singh
 
Niit aptitude question paper
Niit aptitude question paperNiit aptitude question paper
Niit aptitude question paperVivek Singh
 
Excel shortcut and tips
Excel shortcut and tipsExcel shortcut and tips
Excel shortcut and tipsVivek Singh
 
Sql where clause
Sql where clauseSql where clause
Sql where clauseVivek Singh
 
Sql update statement
Sql update statementSql update statement
Sql update statementVivek Singh
 
Sql tutorial, tutorials sql
Sql tutorial, tutorials sqlSql tutorial, tutorials sql
Sql tutorial, tutorials sqlVivek Singh
 
Sql select statement
Sql select statementSql select statement
Sql select statementVivek Singh
 
Sql query tuning or query optimization
Sql query tuning or query optimizationSql query tuning or query optimization
Sql query tuning or query optimizationVivek Singh
 
Sql query tips or query optimization
Sql query tips or query optimizationSql query tips or query optimization
Sql query tips or query optimizationVivek Singh
 
Sql order by clause
Sql order by clauseSql order by clause
Sql order by clauseVivek Singh
 
Sql operators comparision & logical operators
Sql operators   comparision & logical operatorsSql operators   comparision & logical operators
Sql operators comparision & logical operatorsVivek Singh
 
Sql logical operators
Sql logical operatorsSql logical operators
Sql logical operatorsVivek Singh
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraintsVivek Singh
 
Sql insert statement
Sql insert statementSql insert statement
Sql insert statementVivek Singh
 

Mais de Vivek Singh (20)

C programming session 14
C programming session 14C programming session 14
C programming session 14
 
C programming session 13
C programming session 13C programming session 13
C programming session 13
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
 
C programming session 07
C programming session 07C programming session 07
C programming session 07
 
Niit aptitude question paper
Niit aptitude question paperNiit aptitude question paper
Niit aptitude question paper
 
Excel shortcut and tips
Excel shortcut and tipsExcel shortcut and tips
Excel shortcut and tips
 
Sql where clause
Sql where clauseSql where clause
Sql where clause
 
Sql update statement
Sql update statementSql update statement
Sql update statement
 
Sql tutorial, tutorials sql
Sql tutorial, tutorials sqlSql tutorial, tutorials sql
Sql tutorial, tutorials sql
 
Sql subquery
Sql subquerySql subquery
Sql subquery
 
Sql select statement
Sql select statementSql select statement
Sql select statement
 
Sql rename
Sql renameSql rename
Sql rename
 
Sql query tuning or query optimization
Sql query tuning or query optimizationSql query tuning or query optimization
Sql query tuning or query optimization
 
Sql query tips or query optimization
Sql query tips or query optimizationSql query tips or query optimization
Sql query tips or query optimization
 
Sql order by clause
Sql order by clauseSql order by clause
Sql order by clause
 
Sql operators comparision & logical operators
Sql operators   comparision & logical operatorsSql operators   comparision & logical operators
Sql operators comparision & logical operators
 
Sql logical operators
Sql logical operatorsSql logical operators
Sql logical operators
 
Sql joins
Sql joinsSql joins
Sql joins
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
 
Sql insert statement
Sql insert statementSql insert statement
Sql insert statement
 

Último

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 

Último (20)

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 

C programming session 04

  • 1. Slide 1 of 4Ver. 1.0 Programming in C In this session, you will do the practice questions of Chapter 1 and Chapter 2. Objectives
  • 2. Slide 2 of 4Ver. 1.0 Programming in C Chapter 1 1. Write a function to accept a character and display it 40 times. 2. Write a function that accepts a number from 0 to 9, along with a string. The string should then be displayed the number of times specified.
  • 3. Slide 3 of 4Ver. 1.0 Programming in C Chapter 2 1. Write a for loop, which will produce the following output (Hint: use two nested for loops): 1 22 333 4444 55555 2. Create a C program, which calculates the triangular number of the user’s request, read from the keyboard using scanf(). A triangular number is the sum of the preceding numbers, so the triangular number 7 has the value of 7+6+5+4+3+2+1 (same as a factorial in mathematics, for example, factorial of 7 ---- !7).
  • 4. Slide 4 of 4Ver. 1.0 Programming in C Chapter 2 3. Create a C program to check whether the number entered by user is even or odd.

Notas do Editor

  1. Begin the session by explaining the objectives of the session.