Tuesday, March 9, 2021

String name = get_string("What is your name: ");

 using cs50's get_string function:


#include <cs50.h>

#inlcude <stdio.h>


int main(void)

{

        String name = get_string("What is your name: \n");

        printf("Hi %s\n" , name);

}


source: cs50


clang -o hello hello.c. (command line arguments - inputs. to the command)

 configures clang to name the resulting output file "hello" instead of a.out


source: cs50



a.out - stands for "assembly output".

 a.out is the default file name for the file obtained after compiling using  clang



source: cs50

clang - a compiler (a program that converts source code to machine code)

 



source: cs50



make -

 if you type command : "make hello"

the make program will automatically look for a file called "hello.c" to compile

and will produce a file called "hello" that you can execute



source: cs50