Harvard - CS50x - Week 1 - Notes - Part 1

COMPILER takes the source code (the language in which the humans write code) and transofrms it into object code (the code which the machines understands and executes into).

#include <stdio.h> tells the computer to give the access of standard libraries, already built in the language, for use to the user.
    Eg: printf

"make hello" is basically compiling the program, convering the soruce code in to the object code.

Type of variable declaration is required in C

Semi-Colon just terminates the line, it tells the computer that this is all for the command.

%s is a place-holder.

printf takes two inputs, one of which is a place-holder and other the string.

. (DOT) means the curent directory.
    Eg: ./hello

COMMENTS in C : // add content

EQUALITY ==

ASSIGNMENT =

TIL: In linux, one does not need to write the full name. Typing a partial name and hitting tab, completes the task.

%.10f - means telling the computer give me the float number with upto 10 decimal points.

\n - New Line

main indicates, where the program should start.

The variable declaration is done in C to indicate, what one wants to store.

printf allows to have more than one placeholder, but that many values should be there in the argument list to fill.

We should test our code to make sure that it works as expected, and the most effective way to test is to break down all the cases and test each of them.

Comments

Popular posts from this blog

Coursera - CS 101 - Completed