C & DS





  • 1. What is the difference between break and continue statements ? Explain with          examples ?
    2. What is the purpose of goto statement?
    3. How is the associated target statement identified ?
    4. (a) What are constants?
        (b) Name the different data types that C supports and explain them in detail ?
    5. (a) What is meant by looping? Describe any two different forms of looping with               Examples ?
         (b) Write a program to print the following outputs using for loop.
         i) 1
            2    2
            3    3   3
            4    4   4

         ii)         1
              2            2
          3         3           3
      4        4          4         4
    6. What are the logical operators used in C and illustrate with examples?
    7. Whar is the purpose of switch statement ? How does this statement differ from the     other statements?
    8. (a) What is an Expression ? What kind of information is represented by an                      Expression?
        (b) What is an Operator? Describe several different types of operators that are              included within the C language with an example each?
    9. What are the different types of control statements available in C. Explain them         with an example ?
    10.(a) What is the difference between signed integer and unsigned integer in terms of          memory and range?
        (b) Explain the basic structure of C program?
    11. Explain the following and illustrate it with an example?
        (a) Increment and Decrement Operator
        (b) Conditional Operator
        (c) Bitwise Operator
        (d) Assignment operator
    12. State the rules that are applied while evaluating expression in automatic type           conversion?
    13. (a) What is a String constant? How do string constants differ from character                constants? Do string constants represent numerical values?
          (b) Summarize the standard escape sequences in C? Describe them.
          (c) What is a variable. How can variables be characterized? Give the rules for                variable declaration.
    (d) What is a purpose of type declarations? What are the components of type            declaration?
    14. (a) Write a program to determine and print the sum of the following harmonic                 series for a given value of n: 1+1/2+1/3+1/4+…..+1/n.
         (b) An electric power distribution company charges its domestic consumers as               follows:
              Consumption Units                           Rate of Charge
                      0-200                                   Rs. 0.50 per unit
                    201 - 400                      Rs.100 plus Rs.0.65 per unit excess of 200
                    401 - 600                      Rs.230 plus Rs.0.80 per unit excess of 400.
    15. Write a C program that reads the customer number and power consumed and prints the amount to be paid by the customer?