Methodology of programming and C language

 

METHODOLOGY OF PROGRAMMING AND C LANGUAGE

 

Answer Key

 

Total : 50 marks                                                         Time: 2 hours

Section A

Answer any 5 questions. Each question carries 2 marks.

 

1.It is a function.

   Header file process.h.

   It terminates the program.

   This function does not return any value.

2. An assembler is a program that converts assembly language into machine code. 

 


3. Loop takes next iteration.

   Control Passes at the beginning of the loop.

    Never terminates the program

    continue statement causes the conditional test and increment portions of the loop to       

    execute.

4. The conditional operator is also known as a ternary operator.

     The conditional statements are the decision-making statements which depends upon the    

     output of the expression.

 


5. All operation codes have to be remembered.

   All memory addresses have to be remembered.

   It is hard to amend or find errors in a program written in the machine .

   It is very difficult to program in machine language.

6. Identifiers are the names of variables, functions, arrays etc. and identifiers always start      

    with an alphabet.  Identifiers does not allow blank spaces punctuations and Signs.   

     identifiers are user defined names .

 

Section B

Answer any 5 questions. Each question carries 5 marks.

 

7. subprogram definition is a description of the actions of the subprogram abstraction.     

    subprogram call is an explicit request that the called subprogram be executed.    

    subprogram is said to be active if, after having been called, it has begun execution but

    has not yet completed that execution.

    Draw the flow of control in subprogram.

8. Break

goto

It does not require any condition.

Unconditional control jump.

This statement passes control to anywhere in the program.



9.

 


Explain each part in Details.

 

 

10.

11. Switch statement in C tests the value of a variable and compares it with multiple cases.            

      Once the case match is found, a block of statements associated with that particular case      

       is executed.

       Syntax of Switch Statement with Example

12. A relational operator checks the relationship between two operands. If the relation is   

     true, it returns 1; if the relation is false, it returns value 0.



Write Example Program.

Section C

Answer any 1 questions. It carries 15 marks.


 

13.Write Note on

Arithmetic Operators

Increment and Decrement Operators

Assignment Operators

Relational Operators

Logical Operators

Bitwise Operators

Comma Operator

sizeof operator   with Example Program.

 

14. Explain Each of the following in detail

       Decision Statements-If , else if , Nested if , else-if-ladder , switch etc

        Iteration Statements-For,While and do-while

        Jump Statements-break,continue,goto

 

Comments