Cos 201 Flashcards
Mention the features of c
1)It is powerful and flexible
2) it is portable
3) it is efficient
4) it is programmer oriented
Characteristics of c
1) is it is a general purpose programming language
2) it is a structured programming language
3) it helps in the
development of system software
4) has a rich set of operators
5) allows for compact representation of expressions
6) allows for the manipulation of inter processor registers
7) supports a rich set of data types
8) has less number of reserved words
9) can extend it self by adding more function to it library
What is the main application of c
Development of system and application software
What are tokens
They are the basic and smallest unit of a c program
List the 6 tokens we have and explain
1) key words- these are reserved words with standard predefined meaning that only perform a specific task.
2) identifiers- they are use to refer to a particular item
3) strings - this is a combination of characters
4) operator - helps execute expressions
5) special symbols - are symbols declared by the programmer to carry out a specific task
6) constant - are identifiers that do not change , they have a fixed meaning
List the 4 types of constant and explain
1) integer constant- contains integers
2) string coat abt - are represented by double quotes
3) string constants - contains decimal points
4) character constant- contains characters that do not change
What are the basic component of a c program
1) pre processor statement
2) main ()
3) a pair of curly braces
4) declaration
5) statements
6) user defined function
What are preprocessor statements
They are statements that tell the processor what is required to carry out some tasks eg #include
What are header files
They use use to provide necessary information in support of various library functions