C Viva Questions
C Viva Questions
3. What is a compiler?
4. What is IDE?
5. What is a program?
6. What is an algorithm?
The smallest individual units are known as C tokens. C has six types of
tokens Keywords,Constants, Identifiers, Strings, Operators and Special
symbols.
9. What is a Keyword?
Keywords are building blocks for program statements and have fixed
meanings and thesemeanings cannot be changed.
Constants are fixed values that do not change during the program
execution. Types of constants are Numeric Constants (Integer and Real) and
Character Constants (SingleCharacter, String Constants).
13. What are the Back Slash character constants or Escape sequence
charactersavailable in C?
Variables are user-defined names given to memory locations and are used to
store values. Avariable may have different values at different times
during program execution
break statement
continue statement
goto statement
exit() function
23. What is an array ?
strlen();
trcpy();
strcat();
strcmp();
The header file #include is used when these functions are called in a C
program.
This function concatenates the source string at the end of the target
string. Strcmp() function compares two strings to find out whether they
are the same or different. The two strings are compared character by
character until there is a mismatch or end of one of the strings is
reached, whichever occurs first. If in case two strings are identical, a
value of zero is returned. If there is no matches between two strings then
a difference of the two non matching values are returned according to
ASCII values.
Actual arguments are variables whose values are supplied to the function
in any function call. Formal arguments are variables used to receive the
values of actual arguments from the calling program.
A function which does not return a value directly to the calling program
is referred as a void function. The void functions are commonly used to
perform a task and they can return many values through global variable
declaration.