What are some of the differences between Java and C?
Java:
C;
Some more differences between C and java?
Java:
C:
Which are the 2 compilers used for C?
gcc and clang
How to compile a file world.c in both gcc and clang?
gcc world.c -std =c90
clang world,c -std=c99
what are the different compiler options and what are their uses?
The different compiler options are
What are the 2 stage compilation for gcc?
Compilation using the -c flag
Linking using the -o flag
What is the size of char and is it implementation dependent?
The size of char on any computer will be 8
What is the range of signed and unsigned chars
Unsigned chars: {0…255}
Signed chars: {-128….127}
What is the order of the size of the types?
Which all data types are signed/unsigned by default?
The order is as follows
char < short < int < long < long long
Every type is signed by default except for chars
What variables are initialized to 0.
Only global variables are initialized to 0
What are print modifiers for float, shortest of %f,%e
float: %f
shortest of %f, %e: %g
Print modifiers for hex, octal, long int and double
Hex: %x,
Octal: %o
long int: %li
double: %lf
What to watch out for when using the print function:
The compilers don’t check to see if the number of type modifiers is equal to the number of arguments to be output.
Precedence of operators
What is #include
How to include a library header file?
include <curl></curl>
it is preprocessor directive. These are used to insert header files into the program. These header files are given the extension .h
What is the scanf function?
The scanf function is used to read in input. It only contains conversion specifications
What are the things to watch out for when using scanf?
Outline how scanf works
What are the modifers that can be used interchangeably in scanf?
The modifiers that can be used interchangeable are %e. %f, %g