Wednesday, 19 November 2014

C language Question/Model Paper

Question/Model Paper
Q1. The Following program fragment
        int 1=107,x=5;
        printf((x>7)?"%d":"%c",1);

       (a) an execution error            (b) a syntax error
       (c) printing of k                     (c) None of the above

Q2. Choose an correct statement
       
       (a) for loop can be nested
       (b) Nested for loop may use the same index
       (c) While can be nested
       (d) Both a and c

Monday, 10 November 2014

C Questions With Answers

C Questions
Q1. What is C language? Define in brief.
Q2. Write a program to input a string and determine it is Palindrome or not.
Q3. What is ASCII? Write a program to show the ASCII of ‘a’ to ‘z’.
Q4. What is Loop? Where it is applied? Write a program to print the following

*
***
*****
***
*
1
121
12321
121
1
54321
4321
21
1