PROBLEM SOLVING AND PROGRAMMING USING C-MCA 1.1.3

2008 Andhra University M.C.A PROBLEM SOLVING AND PROGRAMMING UNING ‘C’ 

(Effective from the admitted batch of 2004 – 2005)

.Time: 3 Hrs. Max. Marks: 100



1. Explain the following briefly

a) Efficiency of algorithms

b) Program testing

c) Rules for defining variables

D) Scanf

e) go to statement

f) break statement

g) pointer in arrays

h) Recursion

i) malloc ()

j) Hash searching



2. a) Develop an algorithm to compute the sum of the first n terms of

the series

S = 1 - 3 + 5 - 7 + 9 .......................

Describe all intermediate steps



b) Design an algorithm that reads in a set of n single digits and

converts them into a single decimal integer. For example, the

algorithm should convert the set of 5 digits {2,7,4,9,3} to the

integer 27493.



3. a) Explain varous data types and type conversions

b) Explain output functions in C



4. Write a C program to print sin(x) series



5. a) What are the different types of parameters passing techniques?

Explain

b) Write a C program to check whether given number is armstrong

or not.



6. a) What are the various string handling functions in C

b) Write a C program to count number of words, number of lines

to a given text.



7. a) Explain the functions for file handling

b) How the Header files are helpful in C language



8. a) Write a C program to remove duplicates in an ordered array

b) Explain dynamic memory allocation.









2007 Andhra University M.C.A PROBLEM SOLVING AND PROGRAMMING UNING ‘C’ 

(Effective from the admitted batch of 2004 – 2005)

Time : Three hours Maximum : 100 marks



First question is compulsory.

Answer any FOUR from the remaining

Answer all part of any question at one place.



1. Answer the following.

a) Program.

b) Variable.

c) Type Conversion.

d) Library functions.

e) Break statement.

f) Structures.

g) Recursion.

h) Union.

i) Syntax of for loop.

j) Preprocessor directives.



2. (a)What is an algorithm? Explain about writing of algorithms and efficiency of algorithms.

(b) Write an algorithm to reverse a given number.



3. What is a data type? Describe different data types in C with examples.



4. Explain various forms of if, nested – if statements with examples.



5. Describe formatted and unformatted input and output statements in C.



6. (a) Define a function. Differentiate between call by value and call by reference.

(b) What is a pointer? How to declare pointers? Give example.



7. (a) Differentiate between structures and unions with example.

(b) Write a note on graphics in C.



8. (a) How functions can return more values? Explain with an example.

(b) Write a C program for Bubble sort.





2006 Andhra University M.C.A PROBLEM SOLVING AND PROGRAMMING USING C 



Frist Year – First Semester

First Question is Compulsory

Answer any four from the remaining

Answer all parts of any Question at one place.

Time: 3 Hrs. Max. Marks: 100



Answer all parts of any question at one place.

1. (a) What is a program.verification ?

(b) What are the properties of an algorithm ?

(c) Explain the use of comma operater.

(d) What is the output of the following statement if’Count’value is

279. printf (“ %5.2f “,count);

(e) Explain the difference between break and continue

statements.

(f) What are bitwise operaters ? Give meaning of each operator

with an example.

(g) Explain how pointers are useful to represent arrays.

(h) Explain void pointers,

(i) What is dynamic memory allocation ?

(j) What is Hash searching ?



2. (a) Explain the efficiency of algorithms.

(b) Write an algorithm for reversing a given number.



3. (a)Explain priority of operaters and their clubbing,

(b) What are the rules for defining variables ? Explain how variables

are declared and initialized.



4. Write a ‘C’ program to find the number of occurences of a word in the given text.



5. (a) Explain storage classes.

(b) Explain the differences between call by value and call by reference.



6. Define a structure call cricket that will describe the following information. Player name. Team name. Batting average.

Using cricket, declare an array player with 50 elements and write a program to read the information about all the 50 players and print a team- wise list containing names of players with their batting average.



7. (a) Explain random file accessing functions in C.

(b) Explain Command Line arguments.



8. (a) Write a program for removal of duplicates in an ordered array.

(b) Write a ‘C’ program to sort the given array using quick sort.











2004-05 PROBLEM SOLVING AND PROGRAMMING USING C


First Question is Compulsory
Answer any four from the remaining
Answer all parts of any Question at one place.


Time: 3 Hrs.
Max. Marks: 100


1. Answer the following:
a) What is an algorithm?
b) Write any two data types in C with examples.
b) How are logical operators written in C?
c) What are bit wise operators in C?
d) Give an example to illustrate the concept of structures in C.
e) What is hash searching?
f) How do you declare an array of 10 pointers pointing to integers?


2. a) Write an algorithm for swapping two elements without using an extra temporary variable.
b) Write a C program to convert a given decimal number to binary.


3. a) What are the control structures in C? Give a n example each.
b) Write a C program to sort a set of n elements using bubble sort.


4. a) Declare a 12-element array of pointers to functions. Each function will accept two pointers to double-precision quantities as arguments and will return a pointer to a double-precision quantity.
b) Write a program to find the transpose of a given n x n matrix A. The matrix A should be declared using pointers. Your program should store the resultant in A only. No additional matrix be used.


5. a) Write a C Program to find the Kth smallest element of a given array.
b) Explain how your program works for finding the 4th smallest element of the following data: 11, 2, 9, 4, 2, 7, 3, 3, 11, 8, 14, 6.


6. a)What are command line arguments? Explain.
b) Write a program that reads a line of text from a data file character by character and displays the text on the screen.


7. a) Write a C program for hash searching using linear collision.
b) Illustrate the Program for the following data:
10, 12, 20, 23, 27, 30, 31, 39, 42, 44, 45, 49, 53, 57, 60.


8. a) Write a program for Towers of Honoi problem using recursion.
b) Write a program to count the number of vowels in a given string.









Note: please note that the following question papers from 2001 to 2004 old question papermodel. The question paper modal  has been changed form 2004.











2002 Problem Solving and Programming Using C

(Effective from the admitted batch of 2000-2001) 

Time: Three hours

Maximum: 75 marks 





Answer Question 1 and any four questions. 

Answer each question at one place.

All questions carry equal marks. 





1. 

(a) What is the Basic structure of a "C" program?

(b) Explain the process of compiling and running a "C" program with the help of a flow chart.

(c) Distinguish between Static memory allocation and Dynamic memory allocation.

(d) Write a short notes on time complexity of algorithms.

(e) Write a "C" program to find factorial of a given number. 





2.

(a) Describe the various data types using in "C".

(b) Explain about operator precedence and Associatively with an example.

(c) Write a "C" program to find out a solution for given quadratic equation. 





3.

(a) Explain the need for array variables.

(b) Write a "C" program to calculate the elements of the Pascal triangle for 10 rows and print the results?

(c) What are the various string-handling functions used in C. Explain in detail. 





4.

(a) Explain the difference between "Call by reference" and "Call by value"?

(b) Using pointers to read in an array of integers and print the elements in the reverse order?

(c) Write a program that uses a function pointer as a function argument? 





5.

(a) Distinguish between Structure and Union.

(b) Explain the meaning and purpose of the following: 

i. Template

ii. Tag

iii. sizeof

iv. struct 

(c) Write a program that reads a C program and prints in alphabetical order each group of that are identical in the first 10 characters but different some where there after. Don't count words with in strings and comments. Make 10 a parameter that can be set from the command line? 





6.

(a) Write a program to copy the contents of one file into another?

(b) Explain the general format of "fseek" function?

(c) Distinguish between the following functions: 

i. printf and fprintf

ii. getc and getchar

iii. feof and fenor 





7. Write a short notes on the following:

a. DOS function calls

b. BIOS Calls

c. Dynamic memory allocation functions. 





8.

a. Write about "switch" statement with examples.

b. Union and find algorithms for disjoint sets.

c. Collision resolution techniques in hashing.



















2001 Problem Solving and Programming Using C 

(Effective from the admitted batch of 2000-2001) 

Time: Three hours 

Maximum: 75 marks 





Answer Question 1 and any four questions. 

Answer each question at one place. 

All questions carry equal marks. 





1. 

a. Discuss about Top-Down problem solving 

b. Describe briefly about various basic data types in C. 

c. What are pointers? What are their advantages. 

d. Distinguish between Stack and Queue. 

e. What is enum? What are its advantages? 





2. 

a. Write a program to determine and print the sum of series for a given value of n: 1 + 1/2 + 1/3 + 1/4 + .. + 1/n 

b. Write a program to find the GCD (m,n) 





3. 

a. Write a program to find the factorial of given number using recursion. 

b. Explain about the various control structures in C language 





4. 

a. Distinguish between the following: 

i. Global and Local variables 

ii. Global and External variables 

b. Write a program to count the number of characters, number of words, number of vowels in a given string. 





5. 

a. Write a program to implement the Stack. 

b. Discuss about the various string handling functions. 





6. 

a. Explain how Input/Output operations on files handled in C. 

b. Write a program to multiply a matrix 'p' of order 'm' with a matrix 'q' of order 'n'. 





7. 

a. What is sizeof operator? Explain how memory management is performed in C. 

b. Write a program to sort a given list of numbers in ascending order by Quick sort. 





8. 

Write short notes on the following: 

a. Break and continue 

b. Passing value between functions 

c. Error handling



1 comments:

  1. aravind said...:

    The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output[1] and string handling, in the programming language C. The C standard library is an interface standard described by a document; it is not an actual library of software routines available for linkage to C programs. No such implementation is properly called C standard library.

Post a Comment

 
Etutos © 2010-2011