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]
November 25, 2011
C PROGRAMMING AND DATA STRUCTURES CPDS JNTU previous years question papers 2011
Subscribe to:
Post Comments
(
Atom
)
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
- ► 2012 ( 1032 )
-
▼
2011
(
736
)
-
▼
November
(
228
)
-
▼
Nov 25
(
44
)
- WEB TECHNOLOGIES JNTU previous years question papers
- VIRTUAL REALITY JNTU previous years question papers
- MANAGERIAL ECONOMICS AND FINANCIAL ANALYSIS JNTU p...
- SOFTWARE TESTING METHODOLOGIES JNTU previous years...
- UNIX AND SHELL PROGRAMMING JNTU previous years que...
- SOFTWARE ENGINEERING JNTU previous years question ...
- PRINCIPLES OF PROGRAMMING LANGUAGES JNTU previous ...
- MICROPROCESSORS AND INTERFACING JNTU previous year...
- MOBILE COMPUTING JNTU previous years question papers
- OBJECT ORIENTED ANALYSIS AND DESIGN JNTU previous ...
- OBJECT ORIENTED PROGRAMMING JNTU previous years qu...
- MANAGEMENT SCIENCE JNTU previous years question pa...
- INFORMATION SECURITY JNTU previous years question ...
- HUMAN COMPUTER INTERACTION JNTU previous years que...
- FORMAL LANGUAGES AND AUTOMATA THEORY JNTU previous...
- ENVIRONMENTAL STUDIES JNTU previous years question...
- EMBEDDED SYSTEMS JNTU previous years question papers
- ELECTRONIC DEVICES AND CIRCUITS JNTU previous year...
- E-COMMERCE JNTU previous years question papers
- DIGITAL LOGIC DESIGN JNTU previous years question ...
- DESIGN PATTERNS JNTU years question papers
- DESIGN AND ANALYSIS OF ALGORITHMS JNTU previous ye...
- Data Warehousing and Data Mining JNTU previous yea...
- DATABASE MANAGEMENT SYSTEMS JNTU previous years qu...
- COMPUTER NETWORKS JNTU previous years question papers
- COMPUTER ORGANIZATION JNTU previous years question...
- COMPILER DESIGN JNTU previous years question papers
- COMPUTER GRAPHICS JNTU previous years question papers
- C PROGRAMMING AND DATA STRUCTURES CPDS JNTU previo...
- ARTIFICIAL NEURAL NETWORKS JNTU previous years que...
- BASIC ELECTRICAL ENGINEERING JNTU previous years q...
- APPLIED PHYSICS JNTU previous years question paper...
- Advanced Computing Concepts JNTU previous years qu...
- Advanced computer Architecture JNTU previous years...
- Jobs in TNPL Nov-2011
- Recruitment in Punjab State Transmission Corporat...
- Vacancies in THDC as Engineer Trainee and Executiv...
- Doctors Job Vacancies 2011 – Hyderabad – State Ban...
- Syndicate Bank Agricultural Assistants recruitment...
- CSMMU MBBS Second Prof (Pass) Exam 2011 Result Dec...
- HNB Garhwal University M Com (Final Year) Back Pap...
- University of Jammu Certificate Courses Admission ...
- Gautam Buddha University PhD Admission 2011-12
- SVPITM PGDM/MBA Programme 2012 Admission
-
▼
Nov 25
(
44
)
-
▼
November
(
228
)
0 comments :
Post a Comment