Anda di halaman 1dari 15

PESIT Bangalore South Campus Subject & code: Computer Concepts and C programming & 10CCP13/23 Question Bank

Multiple choice Questions


1. The graphical representation of a solution to a given problem is called _____ i)Algorithm ii) Icon iii) flowchart iv) wizard 2. The operator % yields i) quotient ii) remainder iii) percentage iv) fractional part 3. The hexadecimal constant is prefixed with i)0 ii) 0x iii) hx iv) oc 4. Which of these is not a part of CPU i) CU ii) ALU iii) Memory iv) output 5. Which of the following is an octal constant i)099 ii) 0x13 iii) 77 iv) 045 6. Which one of these is the correct arrangement of letters on the keyboard i) ASGFD ii) AFDSG iii) ADGFS iv) QWERTY 7. Which one of these is a string constant i)hello12 ii) hello123 iii) 123 iv) hello12 8. An array subscript(size) may be i) integer constant ii) integer variable iii) integer expression iv) all of these 9. C-statement to find average of three numbers is avg=a+b+c/3; what is the error i) syntax error ii) run time error iii) both I & II iv) none of the above 10. The minimum number of times do while loop is executed i) 0 ii) 1 iii) 2 iv) both I & II 11. The break statement can be used in i) if ii) else-if ladder iii) do while iv) all of the above 12. How many times the loop will be executed for(;;){printf(hello);} i)3 times ii)0 times iii)infinite times iv) 1 byte 13. \0 in string array indicates. i) end of the string ii) start of the string 14. The graphical representation of a solution to a given problem is called _____ i)Algorithm ii) Icon iii) flowchart iv) wizard 15. The operator % yields i) quotient ii) remainder iii) percentage iv) fractional part 16. The hexadecimal constant is prefixed with i)0 ii) 0x iii) hx iv) oc 17. Which of these is not a part of CPU i) CU ii) ALU iii) Memory iv) output 18. Which of the following is an octal constant i)099 ii) 0x13 iii) 77 iv) 045 19. Which one of these is the correct arrangement of letters on the keyboard i) ASGFD ii) AFDSG iii) ADGFS iv) ASDFG 1 1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

20. Which one of these is a string constant i)hello12 ii) hello123 iii) 123 iv) hello12 21. Which of the following is not a keyword i) if ii) for iii) while iv) sum 22. Which of the following is a valid variable name i)2sum ii)sum$ iii)@sum$ iv) sum 23. What is the output of \a ? i) newline ii) tab iii) beep/bell iv) carriage return 24. What is the default value of a global variable? a) 0 b) garbage c) none of these 25. The parameters used in function call are called ------a) formal b) actual c) both c) none. 26. Identify the correct declaration. a) int a[10][10] b) int a[10],[10] c) int (10)(10) 27. The default return type of a function is a)void b) int c) float d) none 28. If an array is partially initialized, remaining element are initialized with a) Zeroes b) garbage c) none 29. return(x,y). Is this valid statement? a) True b) False. 30. How do we pass arrays to functions? Assume a is an array a) sort(a); b) sort(a[10]); c)sort(a[]); 31. In function prototype, specifying -------- is optional a) parameter name b) data type of parameters c) return type 32. Number of passes required to sort n elements in bubble sort is a) n b) n-1 c) n-2 d) n-i-1 33. Is the function declaration int display(void); valid? a) True b) False 34. A variable declared inside a function assumes --- storage class a) local b) global c) static d) register 35. Multi user and multitasking OS is a) Windows XP b) LINUX d) DOS 36. Binary search requires ------------ input a) Sorted b) unsorted c) any of these 37. The data type in a function header to indicate it does not return value is. a) void b) int c) float d) char 38. Which of these is user defined function. a) sqrt() b) clrscr() c) main() d) gets() 39. Only main( ) function can call other functions a) True b) False. 40. void main() { float a=30.3f; int y=5; printf("%d",a%y); }What will be output when you will compile above code?

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

(a) 6 (b) 6.0 (c) 7 (d) Compiler error (e) None of these 41. void main() { int x=5; float r=5.0; printf("%x %X %o",sizeof(x,r),sizeof(r,x),sizeof(sizeof(5.0))); }What will be output when you will compile above code? (a) 4 2 2 (b) 2 4 4 (c) 2 4 2 (d) Compiler error (e) None of these 42. void main() { int y=15,z=25; function(&y,&z); printf("%d\t%d",z,y); } function (int *p,int *q) { return(*p=(*p+*q)-(*q=*p)); }What will be output when you will compile above code? (a) 25 15 (b) 15 25 (c) 25 25 (d) Compiler error (e) None of these 43. void main() { int a=-1; static int count; while(a) { count++; a&=a-1; } printf("%d",count); }What will be output when you will compile above code? (a) 15 (b) 16 (c) 17 (d) Compiler error (e) None of these 44. A computers resolution is determined by a) Monitor b) Video Controllers c)CPU d) System Unit 45. Unlike a transistor, a magnetic disk can store data without a continual source of a) electricity. b) RPMs c) polarity d) light 46. A magnetic disk's tracks are divided into smaller parts called A) clusters B) sectors C) bytes D) slices 47. Stylus is used to input data in a) Super Computer b) Workstation A) c) Smart phone and PDA d) none of these 48. Passing of 1-D array to a function is by _____________technique A) a)pass by number b)pass by reference c)pass by value d)none of these 49. What is the value of floor(-2.2)

1 1

1 1 1

1 1

A) -2.0 B) -3.0 A) C) 2.0 D) 3.0 49. The process of splitting a lengthy and complex program into a number of smaller programs is called 1 A) unit program B) modules A) C) built in program D) logical program 50. Given int a[2][2] = {1,2,3,4}, what is the element in 2nd row and 1st column? 1 A) a) 1 b) 2 c) 3 d) 4 51. Number of elements in an array defined by a[2][2][3] is 1 B) 7 b) 12 c) 8 d)none of these Sample Questions Introduction to Computers, Interacting with computers 1. 2. 3. 4. Give the classification of computers. What is hardware? What are the various hardware units? What is software? What are the different types of software? Define the following terms, give an example for each: a. system software b. application software 5. What are input devices? Name the different types of input devices 6. What is a keyboard? What are the advantages and disadvantages of keyboard? 7. Explain the keyboard layout. What are the various types of keys in the standard Keyboard? 8. What are special purpose keys found in all standard keyboards? 9. What are the five key groups on standard keyboard? 10. How the keyboard works? 11. How the computer accepts input from the keyboard? 12. What is a pointing device? What are the various types of pointing devices? 13. What is mouse? Explain how the mouse works? 14. What are the advantages and disadvantages of mouse? 15. What are the variants of the mouse? 16. What is track ball? How it is used as a pointing device? What are the advantages and disadvantages? 17. What is touch pad? Explain how it works. 18. What is a pen? What are the various devices which use pen as input device? 19. What are game controllers? What are the different types of game controllers? 20. What is bar code? Explain how barcode reader works? What are the advantages and disadvantages? 21. What is a scanner? Explain how it works? What are its advantages and disadvantages? 22. What are the different types of scanners? 23. What is optical character recognition? How does it work? What are its advantages and disadvantages? 24. What is audio input? What are the various audio input devices? 25. What is a microphone? 26. What is speech recognition? How does a speech recognition system works? What are the advantages and disadvantages? 27. What is video input? What are various video input devices?

28. How does video input device work? What are its advantages and disadvantages? 29. What are output devices? What are the various output devices? 30. What is softcopy? What are the various softcopy output devices? 31. What is hardcopy? What are the various hardcopy output devices? 32. What are monitors? What are the various types of monitors? 33. What are the two most commonly used types of monitors 34. What are the major components of CRT monitor? How does it displays image or text on the screen? 35. Explain the working of color monitor. 36. What are flat panel monitors? What are the different types of flat panel monitors? 37. What are the disadvantages of flat panel monitors? 38. What are data projectors? What are the different types of data projectors? Give the differences 39. What is an LCD projector? What is DLP projector? What are the differences between them? 40. List the different input devices and explain the features of the keyboard 41. Explain the dot matrix and laser printers 42. Mention different types of printers along with main features of each type 43. Classify the following printers in to impact/non-impact types a)dot matrix b) laser jet c)line printer d)daisy wheel e)thermal 44. What is inkjet printer? How does it work? What the advantages and disadvantages? 45. What is laser printer? How does it work? What the advantages and disadvantages? 46. Define Digital computer and with the help of a block diagram. Explain the important components
that makeup a typical digital computer. 47. Explain the information processing cycle with a neat diagram.

Processing Data 1. What is Data? 2. What is Information? 3. Are Data and Information same? If not, what is the difference? 4. How computer represents data? 5. Explain the Stored Program concept with neat diagram. 6. Why computers use the binary number system instead of decimal number system 7. What are bits, nibble, and byte? 8. What is EBCDIC, ASCII and extended ASCII? 9. What are the components of computer that process data? 10. What is a machine cycle? 11. What are the activities performed by CPU in instruction and machine cycle? 12. What is pipelining? 13. What is Computer Memory? Discuss in detail the different memory associated with the Computer with examples. 14. Which application needs more Primary Memory and which application needs more Secondary memory? Explain. 15. Describe in detail Floppy, Hard and Compact Disks. 16. What is Formatting? 17. What are Core and Peripherals devices with the respect to Computers? Explain in detail.

18. What is Memory? 19. What is RAM? Explain in detail. 20. What is ROM? Is it same as RAM or different? 21. Compare and contrast RAM and ROM. 22. Is access time in RAM random or fixed? Why is it called Random access? 23. What is Direct Access Storage Device? Give examples of the same. 24. Compare and contrast Primary, Secondary and Cache memories? 25. Why so many memories are provided? 26. Explain volatile and nonvolatile Memories with examples for each of them. 27. Is ROM volatile memory? 28. What is cache? How it works? 29. What is flash memory? How it works? 30. What are the factors that affect the speed of the processor? 31. How to connect external devices to CPU. Comment if extending the processors power to other devices 32. What is a port? What are the various types of ports? 33. What is a serial port? What is a parallel port? What are differences between them 34. Discuss the following : SCSI,USB, Fileware, MIDI 35. What are the factors that affect processing speed? Explain Storing data 1.What is a storage media? Give examples. 2.What are the different types of storage devices? Explain each of them 3.How is data stored and read from on a magnetic disk. 4.Compare and contrast Magnetic and semiconductor Memories. Give examples for each. 5.Can program be executed directly from secondary memory? Give reasons for your answer. 6.What are different types of magnetic storage devices? Explain each of them 7.What are different types of optical storage devices? Explain each of them 8.Explain about FAT? 9.Define average access time. How is it measured? 10. Define data transfer rate? How is it measured? 11. Explain how to measure and improve drive performance? 12. Explain how to optimize disk performance? 13. ) Explain in detail, the different levels of Computer Languages with examples 14. Explain the differences of a compiler and interpreter with neat diagrams Operating systems 1. 2. 3. 4. 5. 6. What is an operating system? What are the primary functions of the operating system? What are the various classification of operating systems What is multitasking? Write a short note on Time sharing and Real Time Processing.
Explain in detail, the classification of software. Give the complete list of softwares and their uses in each category

Networks 1. 2. 3. 4. What is network? What are the various benefits of using a network? What are the basic components of a network? Explain the benefits of networking. Discuss the disadvantages of computer networks.

Algorithms and Flow Charts 1. What is Algorithm? List and explain the characteristics of an algorithm 2. What is Flowchart? 3. Why they are called Programming Tools? 4. What is structured problem solving? 5. What is modular programming concept? What is the relation between them? 6. Does C support modular programming? Explain in detail. 7. Write an algorithm to print all prime numbers between 51 and 1000. 8. Draw a neat flowchart to exchange two numbers without using a temporary variable? 9. What do mean by mixed mode operation? Explain with an example 10. Evaluate the following expressions independent to each other, the declaration and initialization is as follows: int i=3,j=4, k=2; a. i++-j b. ++k%--j c. j+1/i-1 d. j++/i e. ++i/++j+1 15. Explain with examples: a. increment operators b. decrement operators c.conditional Operators.
Discuss the typical steps involved in problem solving using a digital computer.

Write a flowchart to find the average internal marks of three internals taking best of two.

C Language Preliminaries 1. What is C? Explain the historical background of C. 2. Is it similar to other High level languages? If not, what is the difference? Explain in detail. 3. Why C is called Middle Level Language? 4. What are the advantages of C Language? 5. What are keywords? How many keywords are there in C? List all the keywords in C. 6. Do C Programs have to be written in lower case only? Give reasons for your answer. 7. What is the role of functions in C Language? 8. Does C facilitate modular programming? Explain. 9. Give the complete structure of C Program. Give an example of the same. 10. What are Preprocessor Directives in C? 11. What are header files? 12. Describe the steps involved in executing a C Program. 13. What are comments in C Program? What is the syntax for commenting?

14. Can comments be used anywhere in the Program? 15. What is the role of comments in C Program?
16. Write the output for the following code segment int x = 22, a = -1, m = 0, k = 45, y = 97; 1. printf(%d%f%f%d%d\n,x,a,k,m,y); 2. printf(%d %d %d %c %d\n,x,a,k,y,m); 3. printf(%c\t%d\t%d\t%d\t%d\n,y, x,k,m,a); printf(%d\t%d\n%d\n%d\n%d\n,y,a,k,m,x); 17.Write a C program to evaluate the expressions given below. Input relevant co-efficients and values for variables. Print the values for all the variables after each expression evaluation. 1. p = ax2 + bx + c 2. q = --a * p + c++ 3. z = ++q + p--

Constants and Variables in C 1. 2. 3. 4. 5. What are Data Types? Why are they required? What are Primary and derived data types? What are Data modifiers? List them. Why so many Data Types are provided in C? What is memory requirement and range of values for different data types? What is type casting? Will the data type associated with the variable change by type casting? 6. What is Constant? What are the different types of Constant available in C? Give examples. 7. What are the rules for forming numerical constants? 8. Categorize the following constants based on their types or as invalid stating reasons. 153, 23.67, 3.18e3, 0777, 0943, 0x435, 0xABX, a, a, ab, 0.056, -6.65 9. What is Variable? What are the rules for forming a variable? 10. What is declaration? What is its purpose? 11. List out the rules to be followed for defining variable. Give one example for each rule with invalid case. Operators, Expressions and Statements in C 1. What are C operators? What are the different types of operators? Why operators are required? 2. Explain the term Precedence and Associativity? Why are they required? 3. What is integer division? Is it advantage or disadvantage? How is it different from real division? 4. What is Promotion of Data Type? When does it happen? Explain giving examples. 5. List various operators in C in order of Precedence and indicate their associativity. 6. What are Unary operators? List all Unary operators in C. 7. What are Bitwise operators? List all Bitwise operators in C. 8. What is assignment operator? What gets assigned to what? Explain in detail giving examples. 9. If Data Types on the left and right of an assignment expression are different, what is the result?

10. What is on the left side of the equality sign in assignment expression and what is on the right? a = b + c, b+c = a. Which is correct assignment and why? 11. a = a + a is incorrect mathematically. Is it correct in computer? Explain. 12. Explain the terms expression and statement. 13. What is the difference between expression and statement? 14. What are the various expressions available in C? Explain with examples. 15. What are the various statements available in C? Explain with examples. What is a compound statement? 16. Write a C expression for the following: x=3.1415932*rad/180, y=ax2+bx+c, loge (x+y)2 + sin(theta+cos(x+y+z)5), ab/c+d/45+25, y/|a+b| 17. What values do X, A and I have after executing this program? i. B=20.0; ii. C=B+5; iii. I=C-8; iv. X=2*I+1; v. A=X/B; vi. I=X/C; 18. Suppose X=3.1, Y=4.6, L=2 and M=-3. Find the values of A, I, B, J, C and K when the following statements are executed: vii. A=X 2*Y+X/pow(L,2); viii. I=X 2*Y+ pow (X/L,2); ix. B=8/M+3*L; x. J=8.0/M-Y; xi. K=L+3*M; xii. K=pow(k,2)+Y; xiii. C=X+K; Input and Output operations in C 1. With the help of Chart, explain Formatted and unformatted Input and Output operations in C. 2. What are conversion characters? List them. Do they have the same meaning for both Input and output operations? 3. What are Escape Sequences? List them. 4. What is control string? 5. What are scanf and printf? Explain in detail with syntax. 6. What is the format specifier for inputting strings? 7. Can this specifier be used for inputting strings with blank space? 8. What specifier can be used for inputting strings with blank spaces? 9. Can %s specifier be used for outputting strings with blank space?

Control Structures in C 1. With the help of a Chart explain the various controls available in C.

2. 3. 4. 5.

What are unconditional controls available in C? Describe each of them with an example. What are the different types of conditional controls available in C? What is an if statement? What are the varieties of if-statements? Explain along with syntax Write an algorithm and flow chart to find the largest of three numbers. Write the corresponding C program 6. What is the purpose of switch statement? Explain with the syntax. 7. What is a goto statement? When it can be used? Why It is not recommended to use the goto statement. 8. What is bi-directional control? List the bi-directional controls with examples for each of them. 9. What is multidirectional control? List the multidirectional controls with examples for each of them. 10. What is looping control? What is the difference between conditional and looping control? 11. What is Entry controlled Loop? List the various entry controlled Loops in C giving example. 12. What is Exit controlled Loop? List the various exit controlled Loops in C giving example. 13. Is it possible to skip part of the loop and proceed with the next iteration? Give an example. 14. What is the difference between break and continue statements? 15. Differentiate between while and do while statement. 16. Explain for loop with syntax and example. 17. Explain Euclids algorithm and hence apply this to find GCD and LCM of 2 numbers 18. Write a C program to find the roots of a quadratic equation.. Check for non-zero coefficients. 19. Write the general procedure/logic to reverse a given number(do not write any C statement ) Explain the working of for loop by taking an example of finding the factorial of every number between n1 and n2.
20.What is conditional operator? Explain with an example. 21. Given the following input -> 40, 10, 20, 30. Write the trace and program segment to sort them in descending order using bubble sort.

22.Write a C program to compute the value of Eulers number e, that is used as the base of natural logarithm. Use the following formula. Use while statement e= 1+ 1/1!+ !+upto acc=0.0001

Arrays 1. What is an Array? 2. What is the difference between an array and variable? 3. What are the advantages and disadvantages of an array? 4. What is the difference in the declarations of a variable and an array? 5. What is dimension of an array? 6. What are one dimensional and multidimensional arrays? 7. How unidimensional and multidimensional arrays are declared? 8. What is initialization of array? 9. How unidimensional and multidimensional arrays are initialized? 10. What does the name of the array signify? What are the different stages in which arrays can be initialized? Give an example for each.

11. Write a C program to find the product of two matrices by checking the compatibility of two matrices. 12. Explain the Horners method to evaluate a polynomial and write a C program for the same 13. Write a C program to input N integer numbers into a single dimension array. Conduct a linear search for a given key integer number. Report success or failure with suitable message 14. With an example explain how the elements of two dimensional array is stored in row major and column major order, if the base address is 4000 and size of integer is 2 bytes 15. Write a program segment to copy one integer array into another in the reverse order Is Binary Search more efficient than Linear Search? Give reason. Write a program to search for a key element in a given integer array using binary search.Take an example array and trace the binary search on it 16. Write a program to print the following output using for loops 1 23 345 4567

Function 1. Define and provide suitable example of a C function. What is a function call? 2. Can function calls be nested? 3. What is call by value? 4. What is call by reference? 5. Which function is compulsory for every C Program? 6. What are the different categories of functions? 7. What is an argument? 8. What is return? How many values can one function return? 9. What is function Prototype? Is it compulsory in C? 10. What is the need for user-defined functions? Also explain in brief different elements of a user-defined function. 11. Write a function that will generate and print the first n Fibonacci numbers. 12. Discuss the different methods of passing parameters to the function with an example for each. 13. Write a C function to find the factorial of a given number. Using the above function write a C program to compute the binomial coefficient 14. Without using global variables, write a C program by implementing these functions (i) Read N array elements (ii) print N array elements and (iii) conduct binary search for a given key integer number in N array elements 15. Write C user defined functions for: to read N real numbers into a single dimensional array compute their mean

compute their variance compute their standard deviation Using these functions write a C program to input N real numbers into a single i. dimension array, and compute their mean, variance, and standard deviation. ii. Output the computed results with suitable headings. 16. Write C user defined functions: (a) to read N real numbers into a single dimensional array (b) to sort the integer numbers in ascending order using bubble sort technique (c) to print the array elements. 17. Write C user defined functions: a) to read N real numbers into a single dimensional array b) to sort the integer numbers in ascending order using selection sort technique c) to print the array elements 18. What is recursion? Write the C program to find the factorial of a number using recursive function. 19.Mention the differences between pass by value and pass by reference. 20. Distinguish between following With example of each. i) Actual and formal Arguments ii) Global and local variables. 21.Define pointers...Explain with an example of swap function of two numbers. 22. Write a program that accepts a 3x 3 matrix and computes Using functions i) Transpose of the matrix. . ii) Addition of diagonal elements. 23. Write a c program to read n elements of a one dimensional array and find the largest of them 24. Design, develop and execute a program in C to copy its input to its output, replacing each string of one or more blanks by a single blank and trace it with an example of input This is my pen . 25. Write a function that will generate and print the first n Fibonacci numbers Questions on C Programs 1. Write a C program to calculate the sum of the following series. 1 + 1/(3*3) + 1/(5*5) + 1/(7*7).. Suppose an amount of Rs. 10,000 is deposited in a Savings Bank at 10% interest compounded annually. Write a program for the total amount after each year for 10 years. Write a program to determine the number of years it takes to double the amount. The commission on certain sales is as follows sales < Rs.1000 commission is zero sales >= Rs. 1000 and < Rs. 20,000 commission is 5% of sales sales >= Rs. 20,000 commission is Rs.100 plus 10% of the sales of the sales above Rs.1000

2.

3.

4.

Write a C program to compute the commission on sales. Consider the following structured C program segment. M=5; if(J<K) { J=J+5; M=M+J; } else if (J<8) { M=M+10; } else M=M+20; Find the value of M if (i) J=2, K=5 (ii) J=15,K=10 (iii) J=5 , K=5 Find the value of K after the execution of each of the following C statement. int K=3; int I=3; do { K=K+2; I=I+2; } while(I<9); K=5*K; Write a C program to find the Factorial of N. Also display the multiplication table of the Factorial. Write a C program to find whether a number is an Armstrong number or not [e.g. 153=1*1*1+5*5*5+3*3*3] Write a C program to generate the number in Fibonacci Sequence. Fn=Fn-1+Fn-2 and F1=F2=1 Generate numbers upto N. Write a C Program to accept N random numbers and find the average of the same without using arrays. Write a C Program to find the sum of SINE series upto a given accuracy. Write a C Program to find the sum of COSINE series considering N terms Write a C Program to Check Whether a given number is Prime. If so generate prime number upto that number. Accept N. Display first N prime numbers. Write a C Program to calculate the Income tax as per the following table. Annual income (AI) Income tax (IT) AI <= Rs 50,000 Nil Rs 50,000 < AI <=Rs 60,000 10% of the amount an excess of Rs 50,000 Rs 60,000 < AI <=Rs 1,50,000 Rs 1,000 + 20% of the amount in excess of Rs 60,000 AI > Rs 1,50,000 Rs 19,000 + 30% of the amount in excess of Rs 1,50,000

5.

6. 7. 8. 9. 10. 11. 12.

13.

14. Read N integers. Check whether each number is a prime. If so do the following Store all the prime numbers in an array Find the Sum and Average of the Prime numbers Find the biggest & smallest prime number 15. Write a C program accept the heights of N players. Calculate average height of the players. Also display the tallest and the shortest player using arrays. 16. Write a C Program to accept N integers. Sort the same using Bubble sort in ascending and descending order using arrays. 17. Write a C Program to accept N integers. Sort the same using Selection sort in ascending and descending order using arrays. 18. Write a C Program to check whether a given set of n numbers is sorted in ascending or descending order or the numbers are unsorted using arrays. 19. There is a one-day cricket match between India and Pakistan. Accept the number of overs played by India and Pakistan respectively. Store the scores of all players batted. If a player did not bat consider his score to be 0. Display the run rate of the both teams. Display the highest and lowest score of player of both the teams. 20. Test score T of N student are accepted and grades are fixed based on the following information. IF T>=90: GRADE A IF 80<=T<90: GRADE B IF 70<=T<80: GRADE C IF 60<=T<70: GRADE D IF T<60: GRADE E Find the number of students in each grade. 21. Write a C program to read a matrix and display it. Find the odd and even numbers in the matrix. Put the same in the ODD and EVEN arrays respectively. 22. Write a C program to read two matrices and display the product of matrices using functions to perform read, display and multiplication operations. 23. Write a C program to read a matrix and sort it Row wise in ascending order using selection sort. Use functions to perform Read, Display operations. 24. Write a C program to accept a matrix and sort it column wise in descending order using bubble sort. 25. Write a C program to accept a matrix. Find the number of elements, sum, average, biggest, smallest element of the matrix. 26. Write a C program to accept a matrix and display it. Accept a number. Check all the occurrences of the given number in the matrix including its positions. 27. Read a matrix and find the following. Sum of elements of each row Sum of elements of each column Sum of the squares of the diagonal element if it is a square matrix 28. Read a matrix and perform the following operations

29.

30. 31. 32. 33. 34. 35.

Make all the elements of the first row as o and the elements of last row as 1 Display the resultant matrix Write a C program that reads NXN matrix and computes its trace and norm. Prints the matrix row wise, trace and norm. Trace: Sum of the diagonal elements of a square matrix. Norm: square root of the sum of the squares of all the elements in a matrix Write a function that receives M*N matrix as an argument and returns the square of same to the calling Program. Write a C program to find the roots of a quadratic equation using switch statement. What does low-level programming mean? Explain Bit wise operations. Write a C program to display the Binary Bit pattern corresponding to a signed decimal integer. Write a C program to count the number of vowels, consonants and blanks. Also count the number of lines, words and characters in a given text and output the same. Write a C program to find the intersection of two arrays a and b with size m and n respectively.

Anda mungkin juga menyukai