PPL: Sequence Control & Expression

SEQUENCE CONTROL AND EXPRESSION

Viva Voce on Sequence control & expression

Q1. Describe static function with its usage?
Ans) A function, which has a function definition prefixed with a static keyword is defined as a static function. The static function should call within the same source code.

Q2. Describe Wild Pointers in C?
Ans) Uninitialized pointers in the C code are known as Wild Pointers. These are a point to some arbitrary memory location and can cause bad program behaviour or program crash.

Q3. What is the difference between ++a and a++?
Ans) ‘++a”  is called prefixed increment and the increment will happen first on a variable. ‘a++’ is called postfix increment and the increment happens after the value of a variable used for the operations.

Q4. Describe the difference between = and == symbols in C programming?
Ans) ‘==’ is the comparison operator which is use to compare the value or expression on the left-hand side with the value or expression on the right-hand side.
‘=’ is the assignment operator which is use to assign the value of the right-hand side to the variable on the left-hand side.

Q5. What is the explanation for prototype function in C?
Prototype function is a declaration of a function with the following information to the compiler.
  • Name of the function.
  • The return type of the function.
  • Parameters list of the function.

Q6. Describe the header file and its usage in C programming?
Ans) The file contains the definitions and prototypes of the functions being used in the program are called a header file. It is also known as a library file.

Q7. What is a nested loop?
Ans) A loop running within another loop is referred as a nested loop.

Q8. What is a pointer on a pointer in C programming language?
Ans) A pointer variable that contains the address of another pointer variable.

Q9. What are the valid places to have keyword “Break”?
Ans)  Only in Looping or switch statements.


MCQs on Sequence control on expressions

Q1. The break statement is used to exit from
a.  DO loop
b.  FOR loop
c. all of above

Q2. In which statements, does a CONTINUE statement cause the control to go directly to the test condition and then continue the looping process?
a. FOR and WHILE
b. WHILE and IF-ELSE
c. While and DO-WHILE

Q3. The advantage of a SWITCH statement over an ELSE-IF statement
a. A default condition can be used in the SWITCH 
b. The SWITCH is easier to understand1
c. Several different statements can be executed in a SWITCH

Q4. The traditional way to create an infinite loop in C is
a. FOR ( ; ; )
b. IF (=) BREAK;
c. WHILE ()…

Q5. The most common use of the one-dimentional array in C is the
a. String
b. Character 
c. Data 

Q6. C provides loop constructs for performing loop operations. They are
a. The WHILE statement
b. The DO statement 
c. The FOR statement


MCQs Answers

Q1. (c)
Q2. (c)
Q3. (b)
Q4. (a)
Q5. (c)
Q6. (b)

Principles of Programming Languages

EasyExamNotes.com covered following topics in PPL.

Practicals:
Previous years solved papers:
A list of Video lectures
References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

Python Programming ↓ 👆
Java Programming ↓ 👆
JAVA EasyExamNotes.com covered following topics in these notes.
JAVA Programs
Principles of Programming Languages ↓ 👆
Principles of Programming Languages
EasyExamNotes.com covered following topics in these notes.

Practicals:
Previous years solved papers:
A list of Video lectures References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

    Computer Organization and Architecture ↓ 👆

    Computer Organization and Architecture 

    EasyExamNotes.com covered following topics in these notes.

    1. Structure of desktop computers
    2. Logic gates
    3. Register organization
    4. Bus structure
    5. Addressing modes
    6. Register transfer language
    7. Direct mapping numericals
    8. Register in Assembly Language Programming
    9. Arrays in Assembly Language Programming

    References:

    1. William stalling ,“Computer Architecture and Organization” PHI
    2. Morris Mano , “Computer System Organization ”PHI

    Computer Network ↓ 👆
    Computer Network

    EasyExamNotes.com covered following topics in these notes.
    1. Data Link Layer
    2. Framing
    3. Byte count framing method
    4. Flag bytes with byte stuffing framing method
    5. Flag bits with bit stuffing framing method
    6. Physical layer coding violations framing method
    7. Error control in data link layer
    8. Stop and Wait scheme
    9. Sliding Window Protocol
    10. One bit sliding window protocol
    11. A protocol Using Go-Back-N
    12. Selective repeat protocol
    13. Application layer
    References:
    1. Andrew S. Tanenbaum, David J. Wetherall, “Computer Networks” Pearson Education.
    2. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocols, And Architecture",Pearson Education
    3. KavehPahlavan, Prashant Krishnamurthy, “Networking Fundamentals”, Wiley Publication.
    4. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, “Computer Networks: An Open Source Approach”, McGraw Hill.