SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
This is CS50.
scribe notes
problem set 0
walkthrough
  cs50.net/psets
sectioning
 cs50.net/section
office hours
   cs50.net/ohs
int	
  main(void)
{
	
  	
  	
  	
  printf("hello,	
  world!n");
	
  	
  	
  	
  return	
  0;
}
statements
statements




printf("hello,	
  world!n");
loops
loops



while	
  (true)
{
	
  	
  	
  	
  printf("hello,	
  world!n");
}
loops
loops



for	
  (int	
  i	
  =	
  0;	
  i	
  <	
  10;	
  i++)
{
	
  	
  	
  	
  printf("hello,	
  world!n");
}
variables
variables

      int	
  counter	
  =	
  0;
      while	
  (true)
       {
       	
  	
  	
  	
  printf("%dn",	
  counter);
      	
  	
  	
  	
  counter++;
      }
Boolean expressions
Boolean expressions




                (x	
  <	
  y)
   ((x	
  <	
  y)	
  &&	
  (y	
  <	
  z))
conditions
      if	
  (x	
  <	
  y)
      {
       	
  	
  	
  	
  printf("x	
  is	
  less	
  than	
  yn");
       }
      else	
  if	
  (x	
  >	
  y)
      {
      	
  	
  	
  	
  printf("x	
  is	
  greater	
  than	
  yn");	
  
      }
      else
      {
      	
  	
  	
  	
  printf("x	
  is	
  equal	
  to	
  yn");
      }
arrays




string	
  inventory[1];
inventory[0]	
  =	
  "Orange";
#include	
  <stdio.h>

int	
  main(void)
{
 	
  	
  	
  	
  printf("hello,	
  world!");
	
  	
  	
  	
  return	
  0;
 }
10000011   00000001   00010001   00000000 00111101   11111100   01110100   00111101
00000000   01000000   00000000   00000000 00000000   00000000   00000000   00000000
10010000   00000000   00000000   00000000 01010000   00000000   00000111   00110000
00001011   00000001   00001011   00000011 00001010   00000000   00000000   00000000
00000000   00100000   00000000   00000000 00000000   00000000   00000000   00000000
00000000   00100000   00000000   00000000 00000000   00000000   00000000   00000000
00000000   00000000   00000000   00000000 00000000   00000000   00000000   00000000
01110000   00010000   00000000   00100000 00000001   00000000   00000000   00000000
00000000   00000000   00000000   00100000 00000001   00000000   00000000   00000000
00000000   00000000   00000000   01000000 00000001   00000000   00000000   00000000
00000000   00100000   00000000   01000000 00000001   00000000   00000000   00000000
11111111   11111111   11111111   11111111 11111111   11111111   11111111   11111111
10010000   10000000   00000000   01000000 00000001   00000000   00000000   00000000
00101110   01100100   01111001   01101110 01100001   01101101   01101001   01100011
10110000   00000100   00000000   00100000 00000001   00000000   00000000   00000000
10110000   00000100   00000000   00100000 00000001   00000000   00000000   00000000
10100000   00000001   00000000   00000000 00000000   00000000   00000000   00000000
10110000   00000100   00000000   00000000 00000000   00000000   00000000   00000000
00000000   00000000   00000000   00000000 00000000   00000000   00000000   00000000
00000000   00000000   00000000   00000000 00000000   00000000   00000000   00000000
00000000   00000000   00000000   00000000 00000000   00100000   00000000   00000000
                                        ...
how to write a program
how to compile a program
        clang	
  hello.c
how to run a program
        ./a.out
how to compile a program
      clang	
  -­‐o	
  hello	
  hello.c
how to run a program
        ./hello
how to compile a program
         make	
  hello
functions
   main
Standard Library
              stdio.h

printf

...
CS50 Library
                  cs50.h

GetChar

GetDouble

GetFloat

GetInt

GetLongLong

GetString
printf
%c	
  	
  	
  %d	
  	
  	
  %f	
  	
  	
  %lld	
  	
  	
  %s	
  	
  	
  ...
escape sequences
n	
  	
  	
  r	
  	
  	
  t	
  	
  	
  '	
  	
  	
  "	
  	
  	
  	
  	
  	
  0	
  	
  	
  ...
math
+	
  	
  	
  -­‐	
  	
  	
  *	
  	
  	
  /	
  	
  	
  %
primitive types
char	
  	
  	
  double	
  	
  	
  float	
  	
  	
  int	
  	
  	
  long	
  long	
  	
  	
  ...
CS50 types
bool	
  	
  	
  string	
  	
  	
  ...
precedence




             http://www.difranco.net/cop2220/op-prec.htm
how to compile a program
    clang	
  -­‐o	
  hello	
  hello.c	
  -­‐lcs50
how to compile a program
         make	
  hello
to be continued...

Contenu connexe

Tendances

SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D ArraySPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D ArrayMohammad Imam Hossain
 
Verificacion de notas
Verificacion de notasVerificacion de notas
Verificacion de notasLuis Gonzalez
 
C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem Topics MixeR
 
LT 03 - Juan Lopes - Complexidade algoritmos
LT 03 - Juan Lopes - Complexidade algoritmosLT 03 - Juan Lopes - Complexidade algoritmos
LT 03 - Juan Lopes - Complexidade algoritmosDNAD
 
Log Rule for Derivatives
Log Rule for DerivativesLog Rule for Derivatives
Log Rule for DerivativesPhil Clark
 
Kotlin - Null safety
Kotlin - Null safetyKotlin - Null safety
Kotlin - Null safetyss90311
 
New microsoft word document
New microsoft word documentNew microsoft word document
New microsoft word documentshashank777172
 
IB Maths. Power rule
IB Maths. Power ruleIB Maths. Power rule
IB Maths. Power ruleestelav
 
Interference vs. noise
Interference vs. noiseInterference vs. noise
Interference vs. noiseZanyar Anwer
 
Urban Sprawl - European vision
Urban Sprawl - European vision Urban Sprawl - European vision
Urban Sprawl - European vision Emm. Verigos
 
Beginning web programming with PHP [PHP 101-02]
Beginning web programming with PHP [PHP 101-02]Beginning web programming with PHP [PHP 101-02]
Beginning web programming with PHP [PHP 101-02]Mozammel Haque
 
Por qué Crystal? Why Crystal Language?
Por qué Crystal? Why Crystal Language?Por qué Crystal? Why Crystal Language?
Por qué Crystal? Why Crystal Language?Crystal Language
 

Tendances (18)

SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D ArraySPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
 
Ecuaciones Movimiento
Ecuaciones MovimientoEcuaciones Movimiento
Ecuaciones Movimiento
 
Consulta de notas
Consulta de notasConsulta de notas
Consulta de notas
 
Verificacion de notas
Verificacion de notasVerificacion de notas
Verificacion de notas
 
変数の型 - Java 演習
変数の型 - Java 演習 変数の型 - Java 演習
変数の型 - Java 演習
 
C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem
 
COMPUTER GRAPHICS
COMPUTER GRAPHICSCOMPUTER GRAPHICS
COMPUTER GRAPHICS
 
LT 03 - Juan Lopes - Complexidade algoritmos
LT 03 - Juan Lopes - Complexidade algoritmosLT 03 - Juan Lopes - Complexidade algoritmos
LT 03 - Juan Lopes - Complexidade algoritmos
 
week-23x
week-23xweek-23x
week-23x
 
Log Rule for Derivatives
Log Rule for DerivativesLog Rule for Derivatives
Log Rule for Derivatives
 
Kotlin - Null safety
Kotlin - Null safetyKotlin - Null safety
Kotlin - Null safety
 
New microsoft word document
New microsoft word documentNew microsoft word document
New microsoft word document
 
IB Maths. Power rule
IB Maths. Power ruleIB Maths. Power rule
IB Maths. Power rule
 
Interference vs. noise
Interference vs. noiseInterference vs. noise
Interference vs. noise
 
Urban Sprawl - European vision
Urban Sprawl - European vision Urban Sprawl - European vision
Urban Sprawl - European vision
 
Beginning web programming with PHP [PHP 101-02]
Beginning web programming with PHP [PHP 101-02]Beginning web programming with PHP [PHP 101-02]
Beginning web programming with PHP [PHP 101-02]
 
Midi pc to_cc_port_for_kontakt_marcelo port
Midi pc to_cc_port_for_kontakt_marcelo portMidi pc to_cc_port_for_kontakt_marcelo port
Midi pc to_cc_port_for_kontakt_marcelo port
 
Por qué Crystal? Why Crystal Language?
Por qué Crystal? Why Crystal Language?Por qué Crystal? Why Crystal Language?
Por qué Crystal? Why Crystal Language?
 

En vedette

How to hypnotize yourself
How to hypnotize yourselfHow to hypnotize yourself
How to hypnotize yourselfPeter McMahon
 
We make predicting the future easy
We make predicting the future easyWe make predicting the future easy
We make predicting the future easyChristian Aspegren
 
Obeservation
ObeservationObeservation
Obeservationwhiscard
 
Treating anxiety and depression
Treating anxiety and depressionTreating anxiety and depression
Treating anxiety and depressionPeter McMahon
 
Adg selected projects linked in 2012
Adg selected projects   linked in 2012Adg selected projects   linked in 2012
Adg selected projects linked in 2012Anne-Marie Funk
 
Digital Numbers In Indonesia - update version (landscape)
Digital Numbers In Indonesia - update version (landscape)Digital Numbers In Indonesia - update version (landscape)
Digital Numbers In Indonesia - update version (landscape)Seno Pramuadji
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Thomas Petazzoni
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linuxChih-Min Chao
 
TDD in C - Recently Used List Kata
TDD in C - Recently Used List KataTDD in C - Recently Used List Kata
TDD in C - Recently Used List KataOlve Maudal
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 

En vedette (17)

How to hypnotize yourself
How to hypnotize yourselfHow to hypnotize yourself
How to hypnotize yourself
 
Agile Paper Cutter
Agile Paper CutterAgile Paper Cutter
Agile Paper Cutter
 
Välj bättre inomhusluft
Välj bättre inomhusluftVälj bättre inomhusluft
Välj bättre inomhusluft
 
We make predicting the future easy
We make predicting the future easyWe make predicting the future easy
We make predicting the future easy
 
Obeservation
ObeservationObeservation
Obeservation
 
Treating anxiety and depression
Treating anxiety and depressionTreating anxiety and depression
Treating anxiety and depression
 
Adg selected projects linked in 2012
Adg selected projects   linked in 2012Adg selected projects   linked in 2012
Adg selected projects linked in 2012
 
Pmcmahon pptx
Pmcmahon pptx Pmcmahon pptx
Pmcmahon pptx
 
American diabetes month
American diabetes monthAmerican diabetes month
American diabetes month
 
Apoldissi_Brochure_LR
Apoldissi_Brochure_LRApoldissi_Brochure_LR
Apoldissi_Brochure_LR
 
Digital Numbers In Indonesia - update version (landscape)
Digital Numbers In Indonesia - update version (landscape)Digital Numbers In Indonesia - update version (landscape)
Digital Numbers In Indonesia - update version (landscape)
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linux
 
TDD in C - Recently Used List Kata
TDD in C - Recently Used List KataTDD in C - Recently Used List Kata
TDD in C - Recently Used List Kata
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
The iPhone Evolution
The iPhone EvolutionThe iPhone Evolution
The iPhone Evolution
 
Deep C
Deep CDeep C
Deep C
 

Similaire à Week1m

Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)Dylan Field
 
CS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxCS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxrawdnsr
 
CS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxCS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxrawdnsr
 
Programming ppt files (final)
Programming ppt files (final)Programming ppt files (final)
Programming ppt files (final)yap_raiza
 
Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Marta Armada
 
Sketch sort ochadai20101015-public
Sketch sort ochadai20101015-publicSketch sort ochadai20101015-public
Sketch sort ochadai20101015-publicYasuo Tabei
 
Maze solving app listing
Maze solving app listingMaze solving app listing
Maze solving app listingChris Worledge
 
Exact Real Arithmetic for Tcl
Exact Real Arithmetic for TclExact Real Arithmetic for Tcl
Exact Real Arithmetic for Tclke9tv
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinAndrey Breslav
 
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Security Session
 
Compilation process
Compilation processCompilation process
Compilation processAlex Denisov
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source codeDaniel_Rhodes
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrencyjgrahamc
 
5. php bangla tutorial php basic
5. php bangla tutorial php basic5. php bangla tutorial php basic
5. php bangla tutorial php basicSamimKhan19
 

Similaire à Week1m (20)

Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
 
CS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxCS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptx
 
CS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptxCS50 2022 - Lecture 2 - Arrays.pptx
CS50 2022 - Lecture 2 - Arrays.pptx
 
Programming ppt files (final)
Programming ppt files (final)Programming ppt files (final)
Programming ppt files (final)
 
Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3
 
Introduction to c part -1
Introduction to c   part -1Introduction to c   part -1
Introduction to c part -1
 
Sketch sort ochadai20101015-public
Sketch sort ochadai20101015-publicSketch sort ochadai20101015-public
Sketch sort ochadai20101015-public
 
SPL 8 | Loop Statements in C
SPL 8 | Loop Statements in CSPL 8 | Loop Statements in C
SPL 8 | Loop Statements in C
 
Maze solving app listing
Maze solving app listingMaze solving app listing
Maze solving app listing
 
Exact Real Arithmetic for Tcl
Exact Real Arithmetic for TclExact Real Arithmetic for Tcl
Exact Real Arithmetic for Tcl
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in Kotlin
 
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
 
Compilation process
Compilation processCompilation process
Compilation process
 
05 2 관계논리비트연산
05 2 관계논리비트연산05 2 관계논리비트연산
05 2 관계논리비트연산
 
01.introduction.ppt
01.introduction.ppt01.introduction.ppt
01.introduction.ppt
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrency
 
Tu1
Tu1Tu1
Tu1
 
Vcs5
Vcs5Vcs5
Vcs5
 
5. php bangla tutorial php basic
5. php bangla tutorial php basic5. php bangla tutorial php basic
5. php bangla tutorial php basic
 

Dernier

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Dernier (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Week1m

  • 6. office hours cs50.net/ohs
  • 7.
  • 8.
  • 9.
  • 10. int  main(void) {        printf("hello,  world!n");        return  0; }
  • 13. loops
  • 14. loops while  (true) {        printf("hello,  world!n"); }
  • 15. loops
  • 16. loops for  (int  i  =  0;  i  <  10;  i++) {        printf("hello,  world!n"); }
  • 18. variables int  counter  =  0; while  (true) {        printf("%dn",  counter);        counter++; }
  • 20. Boolean expressions (x  <  y) ((x  <  y)  &&  (y  <  z))
  • 21. conditions if  (x  <  y) {        printf("x  is  less  than  yn"); } else  if  (x  >  y) {        printf("x  is  greater  than  yn");   } else {        printf("x  is  equal  to  yn"); }
  • 23. #include  <stdio.h> int  main(void) {        printf("hello,  world!");        return  0; }
  • 24. 10000011 00000001 00010001 00000000 00111101 11111100 01110100 00111101 00000000 01000000 00000000 00000000 00000000 00000000 00000000 00000000 10010000 00000000 00000000 00000000 01010000 00000000 00000111 00110000 00001011 00000001 00001011 00000011 00001010 00000000 00000000 00000000 00000000 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01110000 00010000 00000000 00100000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00100000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 01000000 00000001 00000000 00000000 00000000 00000000 00100000 00000000 01000000 00000001 00000000 00000000 00000000 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 10010000 10000000 00000000 01000000 00000001 00000000 00000000 00000000 00101110 01100100 01111001 01101110 01100001 01101101 01101001 01100011 10110000 00000100 00000000 00100000 00000001 00000000 00000000 00000000 10110000 00000100 00000000 00100000 00000001 00000000 00000000 00000000 10100000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 10110000 00000100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00100000 00000000 00000000 ...
  • 25.
  • 26. how to write a program
  • 27. how to compile a program clang  hello.c
  • 28. how to run a program ./a.out
  • 29. how to compile a program clang  -­‐o  hello  hello.c
  • 30. how to run a program ./hello
  • 31. how to compile a program make  hello
  • 32. functions main
  • 33. Standard Library stdio.h printf ...
  • 34. CS50 Library cs50.h GetChar GetDouble GetFloat GetInt GetLongLong GetString
  • 35. printf %c      %d      %f      %lld      %s      ...
  • 36. escape sequences n      r      t      '      "            0      ...
  • 37. math +      -­‐      *      /      %
  • 38. primitive types char      double      float      int      long  long      ...
  • 39. CS50 types bool      string      ...
  • 40. precedence http://www.difranco.net/cop2220/op-prec.htm
  • 41. how to compile a program clang  -­‐o  hello  hello.c  -­‐lcs50
  • 42. how to compile a program make  hello