Download as TXT, PDF, TXT or read online from Scribd
Download as txt, pdf, or txt
You are on page 1of 2
Unit 1 : :
Long Answer Questions : :
1 a) Explain the basic structure of C program and explain the significance of each section with example. b) Write a C program to read an integer, then display the value in decimal, octal and hexa decimal notation. 2 a) Define a variable? Write the syntax for declaring and initializing a variable? Write a C program to convert Fahrenheit to Celsius degree. b) Draw a computer block diagram and explain the function of each unit. 3 a) Write a C program to swap two integers without using third variable. b) Differentiate Top-Down approach and Bottom-up approach. 4 a) Explain the basic data types supported by C language and discuss their features. Write a C program to find the size of the integer, float, double and char data types. b) Explain the process of creating, compiling and execution of a C program with a neat sketch. 5 a) Write an algorithm and draw a flowchart for finding the largest of 3 integers. b) Write a note on the following with an example program: (i) Relational operators (ii) Logical operators. 6 a) Write a C program to find whether a given character is a VOWEL or a CONSONANT using Conditional operator. b) Explain increment and decrement operators with examples. Unit 2 : : 1 a) Write a C program to find whether a given integer is a palindrome or not. b) Write a C program using do-while loop to read the numbers until -1 and count the positive, negative and zeros encountered by the user. 2 a) Explain about pre-test loops used in C with syntax. b) Write a C program to find all roots of a quadratic equation. 3 a) Write a C program that display Fibonacci Series up to n terms, where n is the value supplied by the user. b) Write a C program to find the factorial of a given positive integer. 4 a) Define a control statement. Briefly discuss about decision control statements in C with syntax. b) Write a calculator program in C programming language to perform addition, subtraction, multiplication, and division using switch statement. 5 a) Briefly discuss about loop control statements in C with syntax. b) Write a C program to find whether a given integer is an Armstrong number or not. 6 a) Write a C program to classify a given number is prime or composite using any loop. b) What are unconditional control statements used in C, briefly discuss about them with an example. : : Short Answer Questions : : 1 Define a token? Write any 10 keywords of C language. 2 Define an operator? Write the precedence and associativity of different arithmetic operators in C. 3 What is the output of following C program? #include<stdio.h> void main() { int a=10,b=7,c; c= a++ + ++b; printf(“a=%d\n b=%d\n c=%d” ,a, b, c); } 4 Differentiate break and continue statements in C. 5 Differentiate type conversion and type casting in C. 6 Define a constant? Write the syntax for its initialization. 7 Define a computer language? What are the different kinds of computer languages. 8 int a=13, b, c, d, e, f; b=a++; c=++b; d=c--; e=--d; f=a + b+ c+ d+ e; What are the final values of a, b, c, d, e, f variables. 9 What are the various bitwise operators used in C? 10 What is the output of the following code? main() { int n; for(n=9;n!=0;n--) printf(“n=%d\n”,--n); }