Subject: Computer Concepts & C programming
Sub Code: CCP/23
1. Write the algorithm for computing the biggest of 3 given numbers also write the flow chart.
2. Evaluate each of the following expr independent of eachother. The declaration and initialiasation statement is int i=3,j=4,k=2;
i) i+ + - j -- ii)++k % --j
iii) j+1/i-1 iv) j++/i--
3. In the following expr write the hierarchy of computation and also mention the type of the operator
4. List the different types of constants used in C. Give 2 examples in each type.
5. With a example explain scanf(() and printf() statements.
6. int a,b;
Give the results of
(i) a &b (ii) a: b (iii) a ^b (iv) a>>2 (v)~b
7. List out fundamental data types in C.
8. What is flow chart? List out symbols used in writing flowchart.
9. Explain the use of bitwise operators in C with examples.
10. Explain with example an algorithm and flowchart.
11. Distinguish between variables and keywords with example.
12. Explain different unary operators in C.
13. Explain relational operators in C.
14. With an example getch() and putchar() functions.
15. Explain briefly printf() with format specifiers.
16. Mention different primitive data types and memory required for them.
17. Mention different operators used in C with examples.
18. Write a program to find the squares and cubes of a 2 digit odd number.
19. Write a program to compute the area of an isosceles triangle.
20. Explain the following operators with eqution:
i) Logical operators
ii ) Relational operators
iii) conditional operators
21. Write the expr in C lang and evaluate the arithmetic expr.
22. Give the basic structure of a C program and explain with an example to find the area and perimeter of a circle of given radius ‘r’.Give the purpose of each line in the program.
23. What is a variable? How are keywords different from them?
24. Explain the following:
i) Conditional operator
ii) Comma operator
iii) size of operator
25. Identify the syntax errors in the following program
/** printing section**/
26. Give the syntax and explain the semantics of formatted i/p and o/p statements.
27. What are bitwise operators available in C?
28. What is a conditional operator? Execute the statement:
y=(x>z)? (2*x+5) :( 1.5*x+3);
29. Write a program segment that will read the value of a x & evaluate the following functions.
1 for x>0
Y= 0 for x=0
-1 for x<0
Using (i) nested if statement (ii) Else if statement (iii) Conditional operator
30. Given 3 sides of a triangle, write a c program to classify the triangle as equilateral, isosceles and scalene.
31. Explain the syntax of switch statement with an example.
32. Explain while loop structure with an example write the flow chart also
33. Write a c program to solve a quadratic equation using switch statement.
34. Using array declaration for Fibonacci series, write a c program to generate first nterms.
35. Write a program to read ten integers from the keyboards and print the sum of evenand odd numbers.
36. Distinguish between while and do while
37. What do you mean by looping? give the syntax for looping statements in c.
38. Write a program to check whether the given number is prime or not. Print the suitable messages.
39. Write a c program to check whether a given 5 digit number is palindrome or not
40. List the different types of control statements explain the types of if statement gives one example for each.
41. Write a program to convert a given decimal numbers into its binary equivalent.
42. Give the syntax of a switch statement and also write an equivalent ladder if statement.
43. Write a program using switch statement to grade the students marks as A=80 andabove=70 and above=60 and above D=40 and above and the rest below 40 as E grade.
44. Write a program to evaluate the following series.
f(x)=x-x³/3! + x/5!-x/7!......................unto given numbers of terms.
45. Write a program to find the number and sum of all integers from 100to 200 and divisible by 7.
46. Write a program segment that will read the value of x and evaluate following function:
1 for x>0
y= 0 for x=0
-1 for x<0
using i) nested if statements ii)else if statements.
47. What is an array? How are they declared in ‘C’? What are the rules to be followedwhile using arrays?
48. a and b are two integers arrays each with n elements. Write a program to find the array c such that
49. Given two sets A and B of integers, write a program to read them. Determineits UNION and INTERSECTION and print the resultant sets.
50. Write a function to concatenate two strings, write a program to read three Strings anduse the function to concatenate them and print it.
51. Give any five string manipulation library functions, with an example each.
52. You are given sufficient number of 5 paise,10 paise,20 paise,25 paise and 50 paise denominations. Given a value of R rupees and P paise,write a C program to determine the minimum number of coins to get the required value. Use any looping construct to implement the program.
53. Explain dot matrix printer.
54. Explain the structure of floppy disc
55. Explain the structure of hard disc. Compare floppy disc and hard disc.
56. Write a note on CD –ROM
57. Discuss the advantages and disadvantages of machine level language.
58. Discuss the advantages of High level language