SlideShare a Scribd company logo
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.

More Related Content

PPS
C programming session 03
PDF
Write a complete C++ program that does the following: 1. The program will c...
PDF
PF LAB ASSIGNMENT
DOCX
Exercises
DOC
Md university cmis 102 week 4 hands on lab new
DOC
Md university cmis 102 week 4 hands on lab new
DOCX
New microsoft office word document (2)
PDF
2012 bcsl-021 solve assihnment
C programming session 03
Write a complete C++ program that does the following: 1. The program will c...
PF LAB ASSIGNMENT
Exercises
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
New microsoft office word document (2)
2012 bcsl-021 solve assihnment

What's hot (19)

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

Viewers also liked (6)

PPS
C programming session 16
PPS
C programming session 02
PPS
C programming session 01
PPS
C programming session 10
PPS
C programming session 05
PDF
Sql create table statement
C programming session 16
C programming session 02
C programming session 01
C programming session 10
C programming session 05
Sql create table statement
Ad

Similar to C programming session 04 (20)

PPS
C programming session 04
PPS
C programming session 08
PDF
Cp manual final
DOCX
Important C program of Balagurusamy Book
RTF
Cse cpl manual-2016
PDF
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
PDF
Pcd201516
PDF
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
PPTX
Seminar 2 coding_principles
PDF
csharp repitition structures
PDF
Python Manuel-R2021.pdf
PDF
cscript_controller.pdf
DOCX
Bti1022 lab sheet 5
PPTX
lecture 2.2.2 2D array.pptx IUGLFHLHFJFY
PDF
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
PPTX
Bsc math previous exam quetions
PDF
A01
DOCX
Dti2143 lab sheet 4
DOC
5: Every Java application is required to have
DOC
15: Which method call converts the value in variable stringVariable to an int...
C programming session 04
C programming session 08
Cp manual final
Important C program of Balagurusamy Book
Cse cpl manual-2016
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
Pcd201516
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
Seminar 2 coding_principles
csharp repitition structures
Python Manuel-R2021.pdf
cscript_controller.pdf
Bti1022 lab sheet 5
lecture 2.2.2 2D array.pptx IUGLFHLHFJFY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
Bsc math previous exam quetions
A01
Dti2143 lab sheet 4
5: Every Java application is required to have
15: Which method call converts the value in variable stringVariable to an int...

More from Vivek Singh (20)

PPS
C programming session 14
PPS
C programming session 13
PPS
C programming session 11
PPS
C programming session 07
PDF
Niit aptitude question paper
PDF
Excel shortcut and tips
PDF
Sql where clause
PDF
Sql update statement
PDF
Sql tutorial, tutorials sql
PDF
Sql subquery
PDF
Sql select statement
PDF
Sql rename
PDF
Sql query tuning or query optimization
PDF
Sql query tips or query optimization
PDF
Sql order by clause
PDF
Sql operators comparision & logical operators
PDF
Sql logical operators
PDF
Sql joins
PDF
Sql integrity constraints
PDF
Sql insert statement
C programming session 14
C programming session 13
C programming session 11
C programming session 07
Niit aptitude question paper
Excel shortcut and tips
Sql where clause
Sql update statement
Sql tutorial, tutorials sql
Sql subquery
Sql select statement
Sql rename
Sql query tuning or query optimization
Sql query tips or query optimization
Sql order by clause
Sql operators comparision & logical operators
Sql logical operators
Sql joins
Sql integrity constraints
Sql insert statement

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
master seminar digital applications in india
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Complications of Minimal Access Surgery at WLH
PDF
Insiders guide to clinical Medicine.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
GDM (1) (1).pptx small presentation for students
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
01-Introduction-to-Information-Management.pdf
master seminar digital applications in india
human mycosis Human fungal infections are called human mycosis..pptx
VCE English Exam - Section C Student Revision Booklet
Complications of Minimal Access Surgery at WLH
Insiders guide to clinical Medicine.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPH.pptx obstetrics and gynecology in nursing
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Structure & Organelles in detailed.
Sports Quiz easy sports quiz sports quiz
Supply Chain Operations Speaking Notes -ICLT Program
Anesthesia in Laparoscopic Surgery in India

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.

Editor's Notes

  • #2: Begin the session by explaining the objectives of the session.