Lab 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CST1000 - Programming in C

Lab 1

Preparation
1. Install Code::Blocks
2. Try the first program

Lab Assignment
Create a file called lab1.c. In it, provide a C program that will do the following:

1. Write a program that will print your mailing address in the following form:
First line : Name
Second line : Door No, Street
Third line : City, Pin code
2. print border lines to the address.
3. using one print statement to print the pattern of asterisks as shown below:

*
* *
* * *
* * * *

Turn In Work

1. Before turning in your assignment, make sure you have followed all of the instructions stated
in this assignment and any additional instructions given by your lab instructor(s). Always test,
test, and retest that your program compiles and runs successfully before submitting it.
2. Show that you completed the assignment. Then submit your lab1.c program via
https://bb.zust.edu.cn/ .

Reminder About Style, Formatting, and Commenting Requirements


• The top of your file should have a header comment,
which should contain: 
○ Your name
○ Date
○ Lab number
○ Brief descrip on about what the program does
○ Any other helpful information that you think would be good to have.
• Variables should be declared at the top of the main function, and should have meaningful
names.

1
• Always indent your code in a readable way. Some formatting examples may be found in
Formatting_Examples.pdf
Grading Rubric

If your program does not compiled or your assignment was not submitted on time, then you will receive
a grade of zero for this assignment. Otherwise, points for this lab assignment will be earned based on
the following criteria:

Functionality 80
Style, Formatting, & Commenting 20
Other -10 if warnings when compile, and other point
deductions decided by grader

You might also like