GE 6151 COMPUTER PROGRAMMING GE 6151 COMPUTER PROGRAMMING IMPORTANT QUESTIONS UNIT-1 PART-A 1. Convert the binary number 110100111101 to octal. 2. Draw a flowchart to find the biggest of two numbers. 3. List different data types available in C. 4. Convert the hexadecimal A53 into its equivalent decimal system.
5. Convert 0.4375 decimal to binary system. 6. State the characteristics of computers. 7. How will you classify computer systems? 8. Why computer is known as data processor? 9. What is cache memory? How is it different from primary memory? 10. What are the rules for pseudocode? 11. Write algorithm to print biggest of three numbers 12. What are the factors needed to classify computers? 13. Write the binary and octal equivalent of hexadecimal number 7BD. 14. What is pseudo code? 15. Give any two tasks which humans perform better than computers. 16. What is the use of computers in medicine and healthcare? 17. Convert the binary number 100110 in to its octal equivalent. 18. What are registers? 19. What is a ternary operator? Give an example. 20. What is use of “break” statement in C. 21. List the rules for defining variable in c. 22. What is an identifier? Give any two example for an identifier. 23. Differentiate between analog and digital computers. 24. Give the full form of ENIAC and EDVAC. 25. Find the decimal equivalent of the hexadecimal number 4D.C8. 26. Convert hexadecimal number into binary equivalent of EBC. 27. Define an algorithm. 28. What are the various basic symbols used in flowcharting? Give their practical representation.
28. What is an algorithm? 29. Mention the important software and hardware technologies used in fifth generation. PART-B 1 .Explain in detail about the different generations of computers 2. Explain the evolution of computers. 3. With suitable diagram explain about computer organization. 4. With suitable example, explain about Number Systems. 5. Explain in detail the characteristics of Computers. 6. Discuss in detail the classification of computers.
7. Convert the decimal number 59.8125 into binary and octal. 8. Explain the different components of a computer system with block diagram. 9. What are the various guidelines to be followed while drawing a flowchart? 10. Discuss the advantages and limitations of flowcharting. 11. What is an algorithm? Write an algorithm to print even numbers from 2 to 100 12. Draw a flowchart to find the sum of 100 natural numbers. 13. Draw a flowchart to multiply two matrices. 14. Write the pseudo code to multiply two matrices.
SARAVANA KUMAR TM/ASSISTANT PROFESSOR/CSE
GE 6151 COMPUTER PROGRAMMING 15. What is the difference between an algorithm and pseudocode? Also write an Algorithm and pseudocode for solving a quadratic equation. 16. Write algorithm to print the Fibonacci series: (0,1,1,2,3,5,8,13,…) 17. Write a pseudo code for calculating compound interest. 18. Write the uses of flowchart and algorithm with suitable examples. UNIT-2 PART-A 1. Write a C program to find the factorial of a given number using iteration. 2. Write the limitations of using getchar() and scanf() functions for reading strings. 3. Write the following conditions using “?” operator. 4x+100 for x<40 Salary = {300 for x=40 4.5x+150 for x>40 4. What is the purpose of main()? 5. Distinguish between While..Do and Do…While statement in C. 6. Write a C program to print the number 10 ten times, the number 9 nine times and so on. 7. Write a C function to check whether the given year is leap or not. 8. Give the output of the following code: float c=34.78650; printf (“%6.2f”,c); 9. What are the different between constant and variable? 10. Differentiate between local and global variables. 11. What are the various types of operators supported by C?
12. Write a code segment using while statement to print numbers from 10 down to 1. 13. Write a c program for the following expressions. (a)a=5 <= 8 && 6!=5 (b)a = b++ + ++b where b = 50 14. Differentiate entry and exit checked conditional checked conditional constructs with an example. 15. What are escape sequences with examples. 16. Mention any two unconditional control structures with syntax. PART-B 1. Explain the various looping constructs. Give an example for each and explain the Working of the construct. 2. Write a C program to find the sum of the series: S = 1+x+x2+x3+…+xn 3. Write a C program to print the given numbers in reverse order. 4. Explain constructs used for decision making and branching. Given an example for each and Explain the working of the construct. 5. Describe various data types in C. 6. Describe any four I/O statement of ‘C’. 7. Write a C program to find the sum of digits in a number. 8. Write a C program to find the roots of quadratic equation. 9. Write a C program to count the letters in a sequence of characters. 10. Write the use of switch… case construct with its syntax and an example. 11. Write a C program to check if a given number is a prime number. 12. Write a C program to find the factorial of a given number using iteration.
SARAVANA KUMAR TM/ASSISTANT PROFESSOR/CSE
GE 6151 COMPUTER PROGRAMMING 13. Write a C program to convert the number of years represented by an integer into the following units of time: i) Minutes ii) Hours iii) Days iv) Months v) Seconds Use switch() statement. State the assumption in your program. 14. Write a C program to calculate the factorial of the given number.
15. What are the different operators available in C? Explain with examples. 16. Differentiate between signed and unsigned integer. 17. Write a C program to check if a given number is a armstrong number or not. 18. Write a C program to print the Fibonacci series: (0,1,1,2,3,5,8,13,…) upto n series. 19. Write a C program to find the greatest among three numbers. UNIT-3 PART-A 1. Write an example code to declare two dimensional arrays. 2. List any four string handling functions. 3. Why use arrays?
4. How strings are represented in C language?
5. What will the output of the following program be? #include main() { charname[15]=”mountain”; printf(“%s/n “,name); printf(“%55\n”,name); printfi’ ‘%8s\n”,name); printf(“%-10.4s”,name); } 6. What is an array? What are the classifications of arrays? 7. What are the limitations of arrays. PART-B 1. Describe how to declare two dimensional array using pointers. And write a for loop to store information and later modification to the declared pointer. 2. Write a C program to concatenate two strings
3. Write a C program to reverse a given string. 4. Write a C program to arrange the numbers in ascending order. 5. Write a C program to subtract two matrices and display the resultant matrices. 6. Write a C program to multiply two matrices. 7. Write a C program to search an element using binary search. 8. Write a C program to sort the given names [bubble sort]. 9. Explain in detail about various string operations with examples. 10. What is a two dimensional array. Explain its declaration, assignment and various initialization methods with examples.
SARAVANA KUMAR TM/ASSISTANT PROFESSOR/CSE
GE 6151 COMPUTER PROGRAMMING UNIT-4 PART-A 1. Define a C function to exchange the content of two variables. 2. What is an argument? Differentiate between formal arguments and actual arguments. 3. How a variable is declared to be a pointer? 4. Is it possible to refer to the elements of an array by using pointer notation? If so, give an example. 5. What is recursion? Give its applications. 6. List out the differences between call by value and call by reference? 7. What are the advantages of pointers. 8. What is the need of functions? 10. What is a pointer? How to declare a pointer variable. 11. Mention the operators used in pointer. 12. What is pointer-to-pointer? PART-B 1. Explain about the different parameter passing methods with examples. 2. Differentiate pass by value and pass by address in c.
3. Write a C program to exchange the contents of two variables using pointers.
4. Write notes on Pointers. 5. Explain in detail how an array can be passed as a parameter in a user-defined function. Illustrate your answer with an example program. 6. Explain the use of pointers in arrays with an example. 7. What are recursive functions? Explain it with an example. 8. Explain in detail about function prototypes with examples. UNIT-5 PART-A 1. Write any two different between structures and union. 2. List the common preprocessor directives. 3. What is the purpose of unions in C? 4. What is self-referential structure? Give an example. 5. Differentiate arrays from structures. 6. What are nested structures? Give an example. PART-B 1. Explain about structures and unions suitable examples. 2. Draw a flowchart and write a C program to print student grade using structure 3. Write C program to read and write employee and their data of joining using Nested structure. 4. Explain about structure declaration in C with suitable example. 5. Discuss about preprocessor facility in ‘C’.
6. Write a C program that gets and display the report of n students with their personal and academic details using structures.
7. Write a C program to store the employee information details using structures and search the particular employee information in employee information. 8. Explain the concept of storage classes with an example. 9. Write a C program to print the mark sheet for 10 students using structures. 10. Write the difference between structure and union. ===============ALL THE BEST====================
SARAVANA KUMAR TM/ASSISTANT PROFESSOR/CSE