Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
IIMid QBank CDS[1]

IIMid QBank CDS[1]

Ratings: (0)|Views: 458|Likes:
Published by vkt2006

More info:

Published by: vkt2006 on Apr 05, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/08/2014

pdf

text

original

 
C PROGRAMMING AND DATA STRUCTURESImportant Questions _________________________________________________________________________ 
UNIT - IIIPointer and Arrays :
Pointers and addresses, Pointers and Arrays, Pointers And function arguments, Addressarithmetic, character pointers and functions, pointers to pointers, multi-dimensional arrays, initialization of pointer arrays, command line arguments, pointers to functions.
1. What way array is different from an ordinary variable2. What conditions must be satisfied by the entire elements of any given array?3.What are subscripts? How are they written? What restrictions apply to the values that can be assigned to subscripts?4.What advantage is there in defining an array size in terms of a symbolic constant rather than a fixed integer quantity?5.Write a program to find the largest element in an array.6. Explain how strings can be stored using a multidimensional arrays.7. What are the string built in functions available? Write in detail about each one of themwith an example.8. The names of employees of an organization are stored in three arrays, namely, first name,second name, and last name. Write a program to concatenate the three parts into one string to be called name.9. Write a C program to do Matrix Multiplications.10.Write in detail about one dimensional and multidimensional arrays. Also write abouthow initial values can be specified for each type of array?11. How to use pointer variables in expressions? Explain through examples.12.Wite a ‘C’ Program to illustrate the use of pointers in arithmetic operations.13.What is a pointer variable? How is a pointer variable different from an ordinaryvariable.14.Write a C program to read in an array of integers. Instead of using subscripting, however,employ an integer pointer that points to the elements currently being read in and which isincremented each time.15
.
Explain the process of accessing a variable through its pointer. Give an Example.16.Write a C program using pointers to read in an array of integers and print its elementsin reverse order.17.Explain the different ways of representing sparse matrices.18.Derive the general formula for accessing an element in a three-dimensional array stored incolumn-major order.19.Write a recursive function in C to find the greatest common divisor of two integers.20.How are initial value written in a one-dimensional array definition? Is the entirearray be initialized? What value is automatically assigned to those array elements notexplicitly initialized?21. Write a program to calculate mean, variance and standard deviation of n numbers.S = √variance, whereVariance = 1/n sum (x
i
 – m)2M = mean of n numbers22.Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers.23.Write a ‘C’ program using pointers to determine the length of a character string.
 _________________________________________________________________________ 
Computer Programming and Data structures 1
 
C PROGRAMMING AND DATA STRUCTURESImportant Questions _________________________________________________________________________ 
24. Write a C program using pointer for string comparison25.Write a C program to arrange the given numbers in ascending order using pointers.26. Write a C program to find number of words, blank spaces, special characters, digits andvowels of a given text using pointers.27
.
The annual examination is conducted for 50 students for three subjects. Write a program to read the data and determine the Following:a) Total marks obtained by each student. b) The highest marks in each subject and the Roll No. of the student who secured it.c) The student who obtained the highest total marks.28. Write a programme to obtain the determinant value of a 3x3 matrix29. Write a programme to sort all the elements of a 4X4 matrix30. Write a programme to add two 6X6 matrices31. Write a programme to read an integer and display its address through integer declarationand achieve the same through pointers and pointer to pointers.32. Write a programme to check whether a string is palindrome33. Write programme to replicate the task carried out by library functions strcpy(), strlen()
 _________________________________________________________________________ 
Computer Programming and Data structures 2
 
C PROGRAMMING AND DATA STRUCTURESImportant Questions _________________________________________________________________________ 
UNIT - IVStructures :
Definition, initializing, assigning values, passing of structures as arguments, Arrays of structures,pointers to structures, self referential structures. Unions, typedef, bit fields, C program examples.
1.What is the main difference between a structure and union in C?2.Write C functions to perform addition and multiplication operations on two complexnumbers use a structure in C to represent a complex number.3.Write a C program to display the contents of a text file.4
.
Explain with example how a structure can be organized in the ‘C’ language?5. Write a C program to print maximum marks in each subject along with the name of thestudents by using structures. Take 3 subjects and 3 students records.6. Explain the different ways of passing structure as arguments in functions.7. Write a C program to illustrate the method of sending an entire structure as a parameter to a function.8.How to compare structure variables? Give an example.9.Define a structure type struct ABS, that contains name, age, designation, and salary.Using this structure, write a C program to read this information for one person from thekeyboard and print the same on the screen.10.Write a C program to illustrate the use of structure pointer.11.Explain the effects of the following statements:(i). int a, *b = &a; (ii). int p, *p; (iii). char *s; (iv). a = (float*)&X;12.How are structure elements accessed using pointer? Which operator is used? Give anexample.13.Write a program to use structure within union. Display the contents of structure elements.14.Write a C program to copy the contents of a text file to another file. The program shouldtake the file names (source file and destination file names) from the command-line.15.Consider a structure master includes the information like name, code, pay, experience.Write a program to delete and display the information contained in master variables for agive code.16.A
 
company markets Hardware items. Create a structure “hwItem” that stores the titleof the item, it’s price, an array of three floats so that it can record the sale in rupees of a particular item for the last three months, category of the item and it’s original equipmentmanufacturer. Write a short program that provided facility to read N no. of itemsinformation, append new item, and displays all records.17. Illustrate the declaration of three character pointer variables using typedef and also usinga macro definition18. Create a structure to store the gender of person, marital status (single, married, divorcedor widowed), one of the eight branches and can choose any 15 subjects. Using bitfieldshighlight the C language’s memory optimization.19. Write a programme to read an integer and using shift operator convert the same to binaryformat.20. Give an example for OR, AND and SHIFT operators highlighting their advantage.21. What is a pointer to a function ? Give an example of its usage highlighting its advantage.
 _________________________________________________________________________ 
Computer Programming and Data structures 3

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->