Sunday, April 19, 2015

edX: - HarvardX: CS50x3 Introduction to Computer Science - week 1 Continue

Right at the end is the touching story of Saroo Brierly which  is going to be made into a film soon.





Some short notes here on the lecture:-

make - make object code
./hello
printf is in stdio.h
main - default entry point
paranthesis - holds what is used in printf
double quotes - surround phrase
\n- newline
;   -   finishing a statement
make - finding the file and convert to object code
clang - compiler
clang hello.c - ls to list contents of directory - a.out
mv a.out hello  and then -lcs50
in stdio.h   more to printf
escape sequences
%i is a placeholder for integer
types of variables - float, int , char
in cs50 library - string and bool - Getstring etc
condition  - if condition   { do this }
boolean expression   -  if condtion  and/or another condtion is true needs && and ||
switches - like if else but use cases
loops  -  for, do while
variables need to be defined
functions
a program to do addition with  int x=Getint();
condition-0.c  -  if, else  at first but could not detect zero so if , else if and else used

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

No comments:

Post a Comment