• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
C programming session 04
 

C programming session 04

on

  • 91 views

 

Statistics

Views

Total Views
91
Views on SlideShare
91
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Begin the session by explaining the objectives of the session.

C programming session 04 C programming session 04 Presentation Transcript

  • 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.