Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Introduction

CS 110 Fundamentals of Computer Programming

1 / 42
Administrative

Instructor: Sana Khalique

Office
Room 205-A Faculty Block

Class meets.
Tuesdays, Thursdays, Fridays

Labs
Wednesdays
Communication

All lecture notes on

lms.nust.edu.pk

Email:
sana.khalique@seecs.edu.pk

Office hours:
Tuesday 12:00pm or by appointment
Assignments

There will be 3-4 assignments

Related to the topics being studied in course

Carry decent weight. (10 % of your total grade)


Deadlines

C-based computer assignments


soft copy only upload to LMS (we will run your program)

NO credit on LATE submission of any deliverable.

Sorry! No Exceptions
Quiz

Announced
Unannounced

No best-of quizzes
All quizzes are counted towards the final result
Lab Work
Involves implementation of topics covered in class

Each lab will comprise of a lab exercise to be submitted during


the same lab time (3 Hrs.)

Lab assignments will be graded and submitted individually


Project: C Language

Grading will be done based upon


Demo
Viva

Group of 3 to 4 students

Original and creative


Introduction

General information

Assessment.
1 Theory (75%).
3-4 Assignments (10%).
5-6 Quizzes (15%).
2 OHTs (30%).
ESE (45%).

2 Practical (25%).
12-13 Lab assignments (70%).
Semester project (30%).

9 / 42
Honor Code

Dishonesty will NOT be tolerated.


Plagiarism.
If our system found your code is plagiarized, then you are at
risk: Zero in all assignments.
Referral to the disciplinarycommittee.
Feel free to discuss assignments with each other, but coding
must be done individually, or within group.
Introduction

We will be studying a programming language called C.

11 / 42
Introduction

Source Material

No required textbook. A few of the many good ones:


1 Paul J . Deitel and Harvey M. Deitel, C: How to Program,
Prentice Hall, 2010.
2 Code Complete (2nd Ed.) by Steve McConnell, 2004.
3 The Art of Computer Programming (TAOCP) by Donald E.
Knuth, 1968.
4 The C Programming Language (2nd Ed.) by Kernighan and
Ritchie, 1988
5 Web is the best and greenest “textbook”

12 /
Introduction

Skills You’ll Learn

1 Become a better programmer


2 Sharpen your mathematical and analytical skills
3 Start “thinking algorithmically”
4 Ace your technical interviews

13 /
Introduction

Fields of computer science

Some examples.
Graphics
Computer Vision
Artificial Intelligence
Robotics
Machine Learning
Data Mining
Data Analytics
Natural Language Processing
User Interfaces
...

14 / 42
Introduction

Take this course if you...

like solving tricky problems


like building things
are curious about how Facebook, Google, etc work
have never written a computer program before

CS110 is a good predictor of who will enjoy and succeed in CS

think "computers and robots are going to take over the world. I
want to befriend them so that my life will be spared."

15 / 42
Introduction

Tips for success

Come to lecture!
Visit course website on LMS.
Utilize the resources we provide you.
Come visit me in Office Hours!
Remember: assignments must be your own work!
Keep up with the assignments

"The wayto learn to program is b y programming"


Nat ha n Myhrvold

16 / 42
Introduction

Socrastic thinking!

If you don’t understand something, ask questions (especially “WHY?”).


There’s no such thing a s a dumb question.
Computers are neither magical nor mysterious. Everything can be
explained!

20 / 42
Introduction

Source Material

No specific development environment required.


IDEs.
MS Visual Studio (Windows), Eclipse IDE for C/C++ Developers
(Windows/Linux), gGrasp Editing.
Notepad++ (Windows), gedit (Linux)
Cygwinwith Notepad++.

Preferred tool used for lab assignments is MS Visual


Studio, other tools for home assignments are also
acceptable.

18 /
Introduction

Why C?

General-purpose programming language designed by Dennis Ritchie


between 1969 and 1973 at AT&T Bell Labs.
imperative (procedural) language

Ken Thompson and Dennis Ritchie, developers of the C programming


language. (wikipedia)

19 / 42
What is programming?

Some definitions.

Program. A set of instructions to be carried out by a computer.

Programming language. A systematic set of rules used to


describe computations in a format that is editable by humans.
Introduction

Why C?

C is designed,
to be compiled using a relatively straightforward compiler,
to provide low-level access to memory,
to encourage cross-platformprogramming
relatively simple
facilitates structured programming
platform independent (Linux, Mac, Windows. . . )
widely used

21 / 42
Introduction

Running a program

Steps.
1 Write it.
code or source code. The set of instructions in a program.
2 Compile it.
compile. Translate a program from one lan gu age to another.
3 Run (execute) it.
output. The messages printed to the user by a program.

22 / 42
Introduction

Your first Cprogram!

1 #include <stdio.h>
2
3 i n t main()
4 {
5 p r int f(" H ello world ! \n" ) ;
6 return 0;
7 }
8

Q. What does this code output (print to the user) when you run
(execute) it?

23 / 42

You might also like