Documente Academic
Documente Profesional
Documente Cultură
5) What is Flowchart ?
A flowchart is a diagrammatic or symbolic representation of an algorithms. It uses
various symbols to represent the operations to be performed.
10) What are the maximum and minimum possible ranges of values for long and
short type?
If the int variable is created by default as a ‘long’ type it typically will have a possible
range of values from a maximum of +214748347 and a minimum of -2147483648. For
‘short’ type these are the maximum and minimum values +327676 and minimum -
32768.
(While answering this question you can specify the approximate value raised to power).
12) What exactly is a ‘variable scope’, ‘local variables’ and ‘global variables’?
The extent to which a variable is accessible in a program is called the ‘variable scope’.
Variables declared internally inside a function are known as ‘local’ variables.
Variables declared externally outside a function are known as ‘global’ variables.
1. Arithmetic operator
2. Relational operators
3. Logical Operators
4. Increment and decrements operators
5. 5.Assignment operators
6. 6.Conditional operator
7. Bitwise oprators
statements
we use a while loop when a statement or group of statements which may have to be
executed a number of times to complete their task. The controlling expression
represents the condition
statements
1. strlen();
2. trcpy();
3. strcat();
4. strcmp();
The header file #include is used when these functions are called in a C program.
27) Explain about the constants which help in debugging?
A #if directive test can be offered with #else and #else if directives. This allows
conditional branching of the program to run sections of the code according to the result.
Constants defined with a #define directive can be undefined with the #undef directive.
The #ifdef directive has a companion directive #ifndef. These commands can be useful
when debugging problem code to hide and unhide sections of the program.
28) Define and explain about ! Operator?
The logical operator ! NOT is a unary operator that is used before a single operand. It
returns the inverse value of the given operand so if the variable “c” had a value of true
then! C would return value of false. The not operator is very much useful in C programs
because it can change the value of variables with successful iterations. This ensures
that on each pass the value is changed.
1. i) client / server – a powerful computer is used as the server which works as the
interpreter between the clients and helps sharing files.
ii)peer to peer – there is no server and all the workstations are treated equally.
example : i++ (which adds one to i and results is scored back to)
17.
What is the syntax for comments in C?
37.
What is token in C?
41.
What is local variable in C?
The variables which are having scope/life only within the function
are called local variables.
These variables are declared within the function and can't be
accessed outside the function.
45.
What is the difference between the expression "++a" and "a++"?
80
What is the difference between calloc and malloc?
.
calloc and malloc are used for dynamic memory allocation. calloc
initializes the memory locations to zero by default but malloc memory
contains garbage values.
81. What is FIFO?
In C programming, there is a data structure known as queue. In
this structure, data is stored and accessed using FIFO format, or
First In First Out. A queue represents a line wherein the first data
that was stored will be the first one that is accessible as well.
91. Suppose a global variable and local variable have the same
name. Is it is possible to access a global variable from a
block where local variables is defined?
No. It is not possible in C. It is always the most local variable that
gets preference.
92. What is a sequential access file?
When writing programs that will store and retrieve data in a file, it is
possible to designate that file into different forms.
A sequential access file is such that data are saved in sequential order:
one data is placed into the file after another.
To access a particular data within the sequential access file, data has to
be read one data at a time, until the right one is reached.