Question 1. What Are The Different Types Of Control Structures In Programming?
There are 3 main control structures in programming:
Sequence, Selection and Repetition.
Sequential control follows a top to bottom flow in executing a program, such that step 1 is first perform, followed by step 2, all the way until the last step is performed.
Selection deals with conditional statements, which mean codes, are executed depending on the evaluation of conditions as being TRUE or FALSE. This also means that not all codes may be executed, and there are alternative flows within.
Repetitions are also known as loop structures, and will repeat one or two program statements set by a counter.
Question 2. What Is || Operator And How Does It Function In A Program?
The || is also known as the OR operator in C programming. When using || to evaluate logical conditions, any condition that evaluates to TRUE will render the entire condition statement as TRUE.
Question 3. Can The “if” Function Be Used In Comparing Strings?
No. “If” command can only be used to compare numerical values and single character values. For comparing string values, there is another function called strcmp that deals specifically with strings.
Question 4. What Are Preprocessor Directives?
Preprocessor directives are placed at the beginning of every C program. This is where library files are specified, which would depend on what functions are to be used in the program. Another use of preprocessor directives is the declaration of constants. Preprocessor directives begin with the # symbol.
Question 5. What Will Be The Outcome Of The Following Conditional Statement If The Value Of Variable S Is 10?
s >=10 && s < 25 && s!=12
The outcome will be TRUE. Since the value of s is 10, s >= 10 evaluates to TRUE because s is not greater than 10 but is still equal to 10. s< 25 is also TRUE since 10 is less than 25. Just the same, s! =12, which means s is not equal to 12, evaluates to TRUE. The && is the AND operator, and follows the rule that if all individual conditions are TRUE, the entire statement is TRUE.
Question 6. Describe The Order Of Precedence With Regards To Operators In C?
Order of precedence determines which operation must first take place in an operation statement or conditional statement. On the top most level of precedence are the unary operators! +, – and &. It is followed by the regular mathematical operators (*, / and modulus % first, followed by + and -). Next in line are the relational operators <, <=, >= and >. This is then followed by the two equality operators == and! =. The logical operators && and || are next evaluated. On the last level is the assignment operator =.
Question 7. What Is Wrong With This Statement? My Name = “robin”;
You cannot use the = sign to assign values to a string variable. Instead, use the strcpy function. The correct statement would be: strcpy (my Name, “Robin”);
Question 8. How Do You Determine The Length Of A String Value That Was Stored In A Variable?
To get the length of a string value, use the function strlen (). For example, if you have a variable named Full Name, you can get the length of the stored string value by using this statement: I = strlen (Full Name); the variable I will now have the character length of the string value.
Question 9. Is It Possible To Initialize A Variable At The Time It Was Declared?
Yes, you don’t have to write a separate assignment statement after the variable declaration, unless you plan to change it later on. For example: char planet  = “Earth”; does two things: it declared a string variable named planet, and then initialize it with the value “Earth”.
Question 10. Why Is C Language Being Considered A Middle Level Language?
This is because C language is rich in features that make it behave like a high level language while at the same time can interact with hardware using low level methods. The use of a well structured approach to programming, coupled with English-like words used in functions, makes it act as a high level language. On the other hand, C can directly access memory structures similar to assembly language routines.
Question 11. What Is The Different File Extensions Involved When Programming In C?
Source codes in C are saved with .C file extension. Header files or library files have the .H file extension. Every time a program source code is successfully compiled, it creates an .OBJ object file, and an executable .EXE file.
Question 12. What Are Reserved Words?
Reserved words are words that are part of the standard C language library. This means that reserved words have special meaning and therefore cannot be used for purposes other than what it is originally intended for. Examples of reserved words are int, void, and return.
Question 13. What Are Linked List?
A linked list is composed of nodes that are connected with another. In C programming, linked lists are created using pointers. Using linked lists is one efficient way of utilizing memory for storage.
Question 14. 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.
Computer Technical Support Interview Questions
TCS Technical Interview Questions
Wipro Technical Interview Questions
Infosys Technical Interview Questions
Aricent Technologies Technical Interview Questions
Computer Technical Support Interview Questions