December 17, 2011

C PROGRAMMING AND DATA STRUCTURES ECE JNTU previous years question papers


C PROGRAMMING AND DATA STRUCTURES CPDS JNTU previous years question papers

2011


1.a) What is an algorithm? List and explain the properties of algorithm.
b) A utility company charges its customers based on their monthly utilization in terms of units as follows:
Description charge
First 100 units Rs.10 per unit
Next 200 units Rs. 9 per unit
Next 200 units Rs.8 per unit
Next units Rs.7 per unit
Write flowchart that reads monthly units of a customer and output the charge amount. [7+8]

2.a) Write minimal C- expressions for the following:
i) 6b4 +3b3-5b2+6b+15
ii) 2234abccab−−
iii) Increment x and then add to z
iv) Maximum of the values of 3 variables a, b and c
v) True if the value of character variable c is in uppercase, otherwise false
vi) Rightmost octal digit in the value of integer variable x
b) What is the difference between the following C-words?
i) 5 and ‘5’ ii) if and ++
c) Write C-program for generation of multiplication table for the given integer input x. For example, if input is 5, the program need to output
5 X 1 = 5
5 X 2 =10
…..
5 X10 =50 [6+2+7]

3.a) Consider the following recursive function
int bbb(int n,int r)
{
printf(“%d %d\n”,n,r);
if (r==0 || n==r)return 1;
else return bbb(n-1,r)+bbb(n-1,r-1);
}
What output is printed for the function call bbb (4,2)? What does the function do?
b) Write a C-program that reads the given n observations at input and computes average of n observations and find the number of observations above average value. The input is value of n followed by n observations. [8+7]

4.a) Consider the following C- program segment.
char*months[12]={“JANUARY”,”FEBRAURY”,”MARCH”,”APRIL”, ”MAY”,”JUNE”,”JULY”,”AUGUST”,”SEPTEMBER”,”OCTOBER”,”NOVEMB ER”,”DECEMBER”};
char **a= months;
char **b = a++;
What are the values of the following expressions? Justify your answer.
i) **a ii) *(*(a+5)+3)
iii) *(a+7) iv) *(*(a+9)+6)==*(*a+11)+7)
v) *(++b) vi) *(b++ +3)
b) Write C-function void exchange (int *x, int *y) that exchange the values pointed by x and y. In addition the function requires counter that count the number of times the function is invoked. [6+9]

5. Write C-structures for line diagram. The Line diagram has the following fields: diagram Name (dynamically allocated string), no of lines, lines(dynamically allocated structure). The line diagram can have 1 to 500 lines. Each line contains two end points, line thickness in pixels and color in the following set (red, black, blue, green, yellow, orange). Each point contains X-coordinate and Y-coordinate in pixels. Using this structure, write a function int countlines (struct line_diagram *l, int c) that returns the number of lines in the given color c. [15]

6.a) List and explain different format literals available in printf statement.
b) Write C-language program that reads a C-program file and outputs number of lines in the program. [7+8]

7.a) Write an algorithm or C-function for selection sort for sorting an array of integer in ascending order.
b) Demonstrate the selection sort results for each pass for the following initial array of elements.
21 6 3 57 13 9 14 18 2 [7+8]

8.a) Write an algorithm that convert the given infix expression in to post fix. Demonstrate your algorithm using stack for the expression a + b*c
b) Write C-structures for implementing queues using Linked Lists. Using these structures, write C-function for dequeue operation. [7+8]

FEEL USEFUL PLEASE GIVE +1

0 comments :

Post a Comment

Get Syllabus in your Mail

Labels

Accenture Admission Notice - 2010 Admission Notification Anna University Anna University Chennai Anna University Question Papers Anna University Trichy Apparel Technology and Management Aptitude Questions Arts and Science Colleges Biomedical Engineering C and CPP Ebooks Calicut University CBSE Question papers Civil Engineering Civil Service Exams Colleges in India Colleges Result Computer Science Engineering Core Jobs CS R2008 CSE CSIR NET EBooks Download ECE EEE EIE Electives Electrical and Electronics Engineering Electronics and communication Electronics and Instrumentation Engineering Engineering Engineering Colleges in Maharashtra Engineering Colleges in TamilNadu Engineering Admissions Engineering Colleges Engineering Colleges in Karnataka Engineering Jobs Engineering Syllabus Entrance Exam Dates Entrance Exam Results Entrance Examination Exam Time Table Experiencer First Year Syllabus Freshers Full Time Jobs Government jobs in india Hardware and Networking Jobs Hotel Management and Catering Technology IGNOU Information Technology INTEVIEW QUESTIONS IT Jobs JNTU Question Papers Jobs in Bangalore Jobs in Chennai Jobs in Coimbatore Jobs in Delhi Jobs in Hyderabad Jobs in India Jobs in Kerala Jobs in Noida Jobs in Tamilnadu Jobs in TATA Karnataka Educations Lab Manuals Mechanical Engineering Medical Colleges Placement Papers Plus 2 Preparation for exams Private Jobs in India Question Papers Question Papers Download Results Announcement Semester 1 Semester 2 Semester 3 Semester 4 Semester 5 Semester 6 Semester 7 Semester 8 Syllabus Syllabus Download Tamil Movie TCS Placement Papers Teaching Jobs TECH MAHINDRA Textile Technology Top colleges University Results UPSC VICEVESVARAYA TECHNOLOGICAL UNIVERSITY waec Walk-in Interview Web Designers

Followers

Archive

Anna university Engineering Syllabus

Earn Money From Online

Government jobs in india

Admission Notification

Total Pageviews

 

Privacy Policy
http://topengineeringcollegesintamilnadu.blogspot.com use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.