Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
75 views3 pages

Assignment 1

The document provides instructions for an assignment in a Programming Fundamentals course. It includes 3 tasks: 1) identifying errors in code snippets, 2) printing shapes using printf statements, and 3) writing a program to print student details. The assignment is due by 11:00 pm on February 17th and must be submitted as a compressed zip folder via the Google Classroom assignment folder.

Uploaded by

Sheikh Adil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views3 pages

Assignment 1

The document provides instructions for an assignment in a Programming Fundamentals course. It includes 3 tasks: 1) identifying errors in code snippets, 2) printing shapes using printf statements, and 3) writing a program to print student details. The assignment is due by 11:00 pm on February 17th and must be submitted as a compressed zip folder via the Google Classroom assignment folder.

Uploaded by

Sheikh Adil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

COMSATS University Islamabad, Lahore Campus

Assignment 1 – Fall 2018


Course Title: Programming Fundamentals Course Code: CSC103 Credit Hours: 4(3,1)
Course Programme
Saira Aslam BSE
Instructor/s: Name:
Semester: 1st Batch: SP19-BSE Section: C Date: 12th Feb 2019

Due Date: 11:00 pm, Sunday 17th February 2019 Maximum Marks: 40 Marks

Read the following instructions very carefully:

• This is an individual task. Plagiarism is not allowed, do your own work and do not lend or borrow
Assignment solution.
• Anybody found to have copied any assignment task will be given a straight zero and referred to
the disciplinary committee for further action.
• Deadline is final, there will be no extensions! Finish your work an hour before the deadline time
and submit it to make sure any issues with internet connectivity etc, can be avoided.
• Task 1 should be done in MS-Word and Task 2 and Task 3 should be done in C (using code blocks)
• Save all above Tasks as Task1, Task2 and Task 3 in a folder
• Save above folder as following Naming convention:
o AssignmentNo_RollNo_Name_Section
o Example:
▪ Assignment1_BSE1234_YOURNAME_C
• Compress the folder by right-clicking on it and choosing send to→ compressed zipped folder
• Submit the compressed folder at Google Classroom “Assignment-1” folder, by uploading it from
your file location.

Task 1: Point out the errors in following code [20 marks]

(a)

#include <stdio.h>
int main(){
printf(Hello);
return 0;
}
(b)

#include <stdio.h>
/*This is a comment
int main(){
printf("Hello\n");
return 0;
}

(c)

#include <stdio.h>
int main(){
printf("Hello")
return 0
}

(d)

int main(){
printf(Hello);
return 0
}

Task 2: Print following shape using simple printf( ) statements [10 marks]

(1) (2) (3) (4) (5) (6)

* ********** * * * * *********
*** * * ** ** * * *********
***** * * *** *** * *********
*** * * **** **** * * *********
* ********** ***** ***** * * *********
Task 3: Write a C program to print your own name, roll number, Age and batch in following
format: [10 marks]
-------------------------------------------------------------------------------------------
************************ Student Record*******************
-------------------------------------------------------------------------------------------
Name: ABC Age: 19 years (for example)
Roll number: SP19-BSE001 (for example) Batch: SP19-BSE

You might also like