Skip to main content

C PROGRAMMING AND DATA STRUCTURES JNTU PREVIOUS YEAR QUESTION PAPER FOR CE, EEE, ME, ECE, CSE, CHEM, EIE, BME, IT, MECT, E.COMP.E, MMT, MEP, AE, ICE, BT, AME DEPARTMENTS




JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
I B.TECH - REGULAR EXAMINATIONS, JUNE - 2010
C PROGRAMMING AND DATA STRUCTURES
(COMMON TO CE, EEE, ME, ECE, CSE, CHEM, EIE, BME, IT, MECT, E.COMP.E,
MMT, MEP, AE, ICE, BT, AME)
Time: 3hours Max.Marks:75
Answer any FIVE questions
All questions carry equal marks
- - -
1.a) Explain the functions of the following:
i) Preprocessor
ii) Compiler
iii) Linker.


b) Draw a flowchart to find maximum and minimum of the given three input numbers.
[6+9]
2.a) Write minimal C-expressions for the following:
i)
4 3 2
3x + − 5x x4 + 7x + 20
ii)
a b c
bc ca ab
− −
iii) Digit at 100’s place of the given integer x. (Ex. Digit at 100’s place in 2578 is
5).
iv) If a > b then the value of expression is a-b, otherwise b-a
v) True if 5 < x < 10 , otherwise false
vi) Divide the integer variable x by 16 using bit-wise operators
b) What is the difference between the following c-words?
i) amount and “amount”
ii) 200 and 200.0
c) A number is said to be prime, if it is not exactly divisible by any other numbers other
than 1 and the number it self. For example 7 and 11 are primes. Write C- language
program that reads a number from input and determine whether it is a prime or not.
[6+2+7]
3.a) Write a recursive function double power(double x, int n) that returns x
n.
Write an
equivalent iterative version. Compare them.
b) Using arrays and iteration, Write C-language program that outputs minimum
number of currency notes required for the given amount at input. For example, an
amount of Rs.4260 shall output 1000s – 4; 100s – 2; 50s -1; 10s-1. The currency
denominations are 1000,500,100,50,20,10,5,2 and 1. [8+7]
4 a) Consider the following C-program.
void testfun(int *a, int b)
b) {
int x=2;
static int y=5;
y=y+b;
x=x+y;
*a=x+y+b;
b=b+ *a;
}
int main()
{
int a=10,b=5,c=20,*x;
x=&a;
testfun(x,b);
printf(“%d %d %d %d\n”,a,b,c,*x);
testfun(x,c);
printf(“%d %d %d %d\n”,a,b,c,*x);
}
Trace the above program execution (changed variable values and bindings of each
statement during execution). What is the output of above program? [15]
5. Write C-structures for the College data. College contains the following fields:
College code (2characters), College Name (dynamically allocated string), year of
establishment, number of courses and courses( dynamically allocated structure). A
College can offer 1 to 50 courses. Each course is associated with course name
(String), duration, number of students. The number of students in the college is sum
of number of students in all the courses in the college. Write a function int
collegeeStrength (struct College *c) that returns the number of students in the
college pointed by c. [15]
6.a) List and explain Streams functions of text files along with their prototypes.
b) Write C-program for finding the number of words in the given text file. Assume that
the words are separated by one or more blanks. [7+8]
7.a) Write an algorithm or C-program for sorting integers in ascending order using
insertion sort.
b) Demonstrate the insertion sort results for each insertion for the following initial array of
elements.
25 6 15 12 8 34 9 18 2 [7+8]
8.a) What are the operations on Linear Lists? Differentiate between using Arrays and
Linked Lists for implementation of Linear Lists.
b) Write Structure for implementing Linked List of integers. Write C-function for
insertion operation in Linked List. [7+8]

Comments

Popular posts from this blog

PROBABILITY AND STATISTICS previous question paper for JNTU university 2nd year first semester students Dept: CSE,IT,CSSE

PROBABILITY AND STATISTICS previous question paper for JNTU university 2nd year first semester students Dept: CSE,IT,CSSE PROBABILITY AND STATISTICS previous question paper for JNTU university 2nd year first semester students Dept: CSE,IT,CSSE II B.Tech I Semester Regular Examinations, November 2007 PROBABILITY AND STATISTICS ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆ ⋆ ⋆ ⋆ ⋆ 1. (a) If A and B are events with P(A) = 1/3, P(B) = 1/4, and P(A U B) = 1/2, find i. P(A/B) ii. P(A \Bc ) (b) Three students A,B,C are in a running race. A and B have the same probability of wining and each is twice as likely to win as C. Find the probability that B or C wins. (c) The students in a class are selected at random one after the other for an examination. Find the probability that the boys and girls are alternate if there are i....

jntu previous year question paper MANAGERIAL ECONOMICS AND FINANCIAL ANALYSIS for 2nd year first semester CE and MMT department

jntu previous year question paper MANAGERIAL ECONOMICS AND FINANCIAL ANALYSIS  for 2nd year first semester  Mechanical Engineering,Electronics and Communication Engineering,Computer Science Engineering,Information Technology,Electronics and Telematics,Computer Science and Systems Engineering,Electronics and Computer Engineering,Production Engineering,Instrumentation and Control Engineering and Automobile Engineering jntu previous year question paper MANAGERIAL ECONOMICS AND FINANCIAL ANALYSIS  for 2nd year first semester  Mechanical Engineering,Electronics and Communication Engineering,Computer Science Engineering,Information Technology,Electronics and Telematics,Computer Science and Systems Engineering,Electronics and Computer Engineering,Production Engineering,Instrumentation and Control Engineering and Automobile Engineering III B.Tech I Semester Regular Examinations, November 2007 MANAGERIAL ECONOMICS AND FINANCIAL ANALYSIS (Common to Mechanical Engineering,Ele...

CHEMICAL REACTION ENGINEERING-I JNTU UNIVERSITY PREVIOUS YEAR QUESTION PAPER COLLECTION 3rd year first semester Chemical Engineering department

CHEMICAL REACTION ENGINEERING-I JNTU UNIVERSITY PREVIOUS YEAR QUESTION PAPER COLLECTION 3rd year first semester Chemical Engineering department CHEMICAL REACTION ENGINEERING-I JNTU UNIVERSITY PREVIOUS YEAR QUESTION PAPER COLLECTION 3rd year first semester Chemical Engineering department III B.Tech I Semester Regular Examinations, November 2007 CHEMICAL REACTION ENGINEERING-I (Chemical Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆ ⋆ ⋆ ⋆ ⋆ 1. The activation energy for the decomposition of N2O5 is 24630 cal/g mole (103 kJ/mole). (a) What will be the ratio of their rates at 00C and 250C (the rate being measured at the same concentration of reactant)? (b) If the rate constant of the reaction at 250C is 0.002 min−1 calculate the rate constant for the reaction at 500C [8+8] 2. A constant density first order reaction A ! P is carried out in a batch reactor. Data obtained are given as: Time(sec) 30 60 90 120 150 180 600 Concentr...