CH 2. BEGINNING WITH C Flashcards
(100 cards)
C language was developed by ____________.
DENNIS RITCHIE
C was developed at ___________.
AT & T Bells laboratory
state the features of c language?
The features of c language are as follows:
- Robust language: c is a strong/structured language.
- general purpose: can perform both system and application tasks/programs.
- case sensitive language: c only accepts short letters otherwise its considered as an error.
- portable: c can be programmed in several devices it will execute the same output.
- c is a middle and low level language: c is categorised as both user level language (high level language) and machine level language(low level language).
- fast and efficient: c can be programmed and can execute the programs in a quick and efficient way.
- Modularity: c can solve large problems by dividing the tasks into modules/functions/procedures.
state whether the following statement is Right or wrong;
c can only perform application tasks
wrong.
c is general purpose i.e it can perform both application and system tasks.
state whether the following statement is Right or wrong:
other letters apart from the short letters in programming in c is considered as error.
Right
state whether the following statement is Right or wrong:
c can give several outputs in different devices.
wrong.
output of the same program doesnt differ in devices if it is programmed in C.
state whether the following statement is Right or wrong:
c can be both user level and high level language.
wrong.
As user level is called as high level language. c can be both machine level language (low) and user level language (high)
what is modularity in c?
modularity is a feature of c where it divides big tasks into short modules/functions/procedures in order to execute them efficiently.
write a basic c program that includes printf
#include #include void main() { printf("welcome to c language"); getch(); clrscr(); }
what is the use of:
printf()
the printf function is used to print an output.
what is the use of:
main()
the main function is denotes the line from which execution of a program starts.
what are comment lines?
comment lines ( /* *\ ) are non executable statements in a program i.e which are ignored by compiler which is used for understanding the programs.
______ in programs helps in debugging and testing programs.
comment lines
__ is a special character used in printf.
/n new line
/n denotes _____.
new line
lines in {} has to end with _____.
semicolon.
uppercase letters are used for ____.
symbolic constants
each statement in c must end with ___.
semicolon.
___ indicates beginning of a function.
open brace bracket. {
___ indicates end of a function.
closed braced bracket. }
program in c should have ____ extension.
.c
What is C character set?
1.A character denotes any alphabet,digits,special symbols, white spaces etc.
2. A character set comprises of the foll:
Letters or alphabets:A,B,C….,X,Y,Z a,b,c,…,x,y,z
Digits: 0123456789
Special characters: #@!$%^&*()?,;:”’+×÷=/_
White spaces: blanks, horizontal tabs, newline, formfeed, carriage return.
What are c tokens?
1.Smallest individual unit in c is called as tokens
2. The types of tokens are as follows:
Keywords/identifiers/constants/strings/ special symbols/ operators.
What are keywords in c?
Keywords are words whose meanings have already been defined and the meanings cannot be changed.
Keywords are also called as reserved words.
There are 32 keywords in c.