SlideShare uma empresa Scribd logo
1 de 7
www.studentyogi.com                                                        www.studentyogi.com
       Code No: R05010106
                                                                            Set No. 1
                   I B.Tech Supplimentary Examinations, Aug/Sep 2008
                      C’ PROGRAMMING AND DATA STRUCTURES
           ( Common to Civil Engineering, Electrical & Electronic Engineering,
              Electronics & Communication Engineering, Computer Science &
           Engineering, Electronics & Instrumentation Engineering, Bio-Medical
         Engineering, Information Technology, Electronics & Control Engineering,
           Computer Science & Systems Engineering, Electronics & Telematics,
            Electronics & Computer Engineering, Aeronautical Engineering and
                             Instrumentation & Control Engineering)
       Time: 3 hours                                                             Max Marks: 80
                                     Answer any FIVE Questions
                                   All Questions carry equal marks




                                                                                  om
         1. (a) Write the various steps involved in executing a C program and illustrate it
                  with a help of owchart.
             (b) Candidates have to score 90 or above in the IQ test to be considered eligible
                  for taking further tests. All candidates who do not clear the IQ test are sent
                  reject letters and others are sent call letters for further tests. Represent the




                                                                        i.c
                  logic for automating this task.                                                    [8+8]

         2. (a) Distinguish between getchar and scanf functions for reading strings.
             (b) Write a program to count the number of words, lines and characters in a text.


                        g
         3. (a) How to use pointers as arguments in a function? Explain through an example.
                                                                                                     [8+8]
                   omyo
             (b) Write a ‘C’ function using pointers to exchange the values stored in two loca-
                 tions in the memory.                                                                [8+8]

         4. (a) What is the use of struct keyword? Explain the use of dot operator? Give an
                      t
                 example for each.
                i.cen

             (b) Write a C program to accept records of the di erent states using array of
                 structures. The structure should contain char state, population, literary rate,
                 and income. Display the state whose literary rate is highest and whose income
             otgud


                 is highest.                                                                     [6+10]

         5. (a) Distinguish between text mode and binary mode operation of a le.
             (b) Write a program to open a pre-existing le and add information at the end of
                  le. Display the contents of the le before and after appending. [4+12]
         nty.s




         6. Write a program to convert a given post x expression to pre x expression using
            stacks.                                                                                   [16]
       de w




         7. Write a C program to insert and delete the elements from a circular doubly linked
            list.                                                                                     [16]
        w




                                                     1 of 2
    stuw




www.studentyogi.com                                                       www.studentyogi.com
  w.
ww
www.studentyogi.com                                                    www.studentyogi.com
       Code No: R05010106
                                                                        Set No. 1
         8. Write a C program for implementing quick sort algorithm to arrange the elements
            in ascending order. Demonstrate the working of quick sort algorithm for the list of
            integers: 40,16,23,54,36,90,7,88,66,9.                                              [8+8]




                                                                            om
                                                                    i.c
                                                           og
                                               nty
                              u        de
           w              .st
        ww




                                                  2 of 2




www.studentyogi.com                                                  www.studentyogi.com
www.studentyogi.com                                                         www.studentyogi.com
       Code No: R05010106
                                                                             Set No. 2
                   I B.Tech Supplimentary Examinations, Aug/Sep 2008
                      C’ PROGRAMMING AND DATA STRUCTURES
           ( Common to Civil Engineering, Electrical & Electronic Engineering,
              Electronics & Communication Engineering, Computer Science &
           Engineering, Electronics & Instrumentation Engineering, Bio-Medical
         Engineering, Information Technology, Electronics & Control Engineering,
           Computer Science & Systems Engineering, Electronics & Telematics,
            Electronics & Computer Engineering, Aeronautical Engineering and
                             Instrumentation & Control Engineering)
       Time: 3 hours                                                             Max Marks: 80
                                     Answer any FIVE Questions
                                   All Questions carry equal marks




                                                                                   om
         1. (a) What is an expression? What kind of information is represented by an ex-
                 pression?
             (b) What is an operator? Describe several di erent types of operators that are
                 included with in the C language with an example each. [8+8]

         2. The annual examination is conducted for 50 students for three subjects. Write a




                                                                         i.c
            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.                                          og
              (c) The student who obtained the highest total marks. [5+6+5]

         3. (a) What is a pointer? How is a pointer initiated? Give an example.
                                                   nty
             (b) State whether each of the following statements is true or false. Give reasons.
                     i. An integer can be added to a pointer.
                    ii. A pointer can never be subtracted from another pointer.
                   iii. When an array is passed as an argument to a function, a pointer is passed.
                                          de


                   iv. Pointers can not be used as formal parameters in headers to function
                        de nitions.
              (c) If m and n have been declared as integers and p1 and p2 as pointers to integers,
                                u



                   then nd out the errors, if any, in the following statements.
                     i. p1 = &m;
                            .st




                    ii. p2 = n;
                   iii. m=p2-p1;
                   iv. *p1 = &n;                                                                      [4+6+6]
           w




         4. A company markets Hardware items. Create a structure “hwItem” that stores the
            title of the item, it’s price, an array of three oats 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
        ww




                                                      1 of 2




www.studentyogi.com                                                        www.studentyogi.com
www.studentyogi.com                                                      www.studentyogi.com
       Code No: R05010106
                                                                          Set No. 2
            original equipment manufacturer. Write a short program that provides facility to
            read N no. of items information, append new item, and displays all records. [16]

         5. (a) List and explain various binary modes of opening a le.
             (b) Write a C program to read a C program le and count the total number of
                 statements in the complete input C program.                                        [6+10]

         6. What is a Circular Queue? Explain the various operations on Circular Queues with
            suitable algorithms.                                                             [4+12]

         7. What is Circular linked list? Explain various operations on Circular linked list with
            algorithms.                                                                               [16]

         8. (a) Write a C program to merge two sorted arrays of integers.
             (b) Derive the time complexity of merge sort.                                           [8+8]




                                                                               om
                                                                      i.c
                                                             og
                                                 nty
                               u        de
           w               .st
        ww




                                                    2 of 2




www.studentyogi.com                                                      www.studentyogi.com
www.studentyogi.com                                                        www.studentyogi.com
       Code No: R05010106
                                                                            Set No. 3
                   I B.Tech Supplimentary Examinations, Aug/Sep 2008
                      C’ PROGRAMMING AND DATA STRUCTURES
           ( Common to Civil Engineering, Electrical & Electronic Engineering,
              Electronics & Communication Engineering, Computer Science &
           Engineering, Electronics & Instrumentation Engineering, Bio-Medical
         Engineering, Information Technology, Electronics & Control Engineering,
           Computer Science & Systems Engineering, Electronics & Telematics,
            Electronics & Computer Engineering, Aeronautical Engineering and
                             Instrumentation & Control Engineering)
       Time: 3 hours                                                             Max Marks: 80
                                     Answer any FIVE Questions
                                   All Questions carry equal marks




                                                                                  om
         1. (a) Describe in detail the execution of while statement with example.
             (b) Given a number, write a program using while loop to reverse the digits of the
                  number. For e.g. 12345 should be written as 54321.
              (c) Write a program to compute the sum of the digits of a given integer number.
                                                                                                 [4+6+6]




                                                                       i.c
         2. (a) Distinguish between formal variable and actual variable.
             (b) Distinguish between local and global variable.

                                                              og
              (c) Distinguish between call by value and call by reference. [4+4+8]

         3. (a) Write a ‘C’ Program to compute the sum of all elements stored in an array
                  using pointers.
             (b) Write a ‘C’ program using pointers to determine the length of a character
                                                  nty
                 string.                                                                             [8+8]

         4. (a) What are Bit elds. What are its advantages. What is its syntax.
             (b) Write a C program to store the information of vehicles. Use bit elds to store
                 the status information. Assume the vehicle object consists of type, fuel and
                                         de


                 model member elds. Assume appropriate number of bits for each eld.[8+8]

         5. Write a C program to read information about the student record containing stu-
            dent’s name, student’s age and student’s total marks. Write the marks of each
                               u



            student in an output le.                                                                  [16]
                           .st




         6. Declare two queues of varying length in a single array. Write functions to insert
            and delete elements from these queues.                                                    [16]

         7. Circular linked lists are usually set up with so-called list header. What is the reason
           w




            for introducing such a header? Write fucntions to insert and delete elements for
            this implementation.                                                                    [4+12]
        ww




                                                     1 of 2




www.studentyogi.com                                                      www.studentyogi.com
www.studentyogi.com                                                      www.studentyogi.com
       Code No: R05010106
                                                                          Set No. 3
         8. (a) By hand, trace the action of heap sort on the following lists. Draw the initial
                  tree to which the list corresponds. Show how it is converted into heap and
                  show how the resulting heap as each entry is removed from the top and the
                  new entry inserted.
                  12 20 34 27 30 36 23
             (b) Discuss the advantages and disadvantage of all sorting techniques with exam-
                  ple.                                                                            [8+8]




                                                                               om
                                                                      i.c
                                                             og
                                                 nty
                               u        de
           w               .st
        ww




                                                    2 of 2




www.studentyogi.com                                                     www.studentyogi.com
www.studentyogi.com                                                       www.studentyogi.com
       Code No: R05010106
                                                                           Set No. 4
                   I B.Tech Supplimentary Examinations, Aug/Sep 2008
                      C’ PROGRAMMING AND DATA STRUCTURES
           ( Common to Civil Engineering, Electrical & Electronic Engineering,
              Electronics & Communication Engineering, Computer Science &
           Engineering, Electronics & Instrumentation Engineering, Bio-Medical
         Engineering, Information Technology, Electronics & Control Engineering,
           Computer Science & Systems Engineering, Electronics & Telematics,
            Electronics & Computer Engineering, Aeronautical Engineering and
                             Instrumentation & Control Engineering)
       Time: 3 hours                                                             Max Marks: 80
                                     Answer any FIVE Questions
                                   All Questions carry equal marks


         1. (a) What is the conditional operator. What is its general syntax.




                                                                                om
             (b) Write a C program to nd the largest of three input numbers using conditional
                 operator.                                                                       [8+8]

         2. (a) What do you mean by functions? Give the structure of the functions and
                 explain about the arguments and their return values.




                                                                       i.c
             (b) Write a C program that uses a function to sort an array of integers. [8+8]
         3. (a) Write a ‘C’ Program to compute the sum of all elements stored in an array
                  using pointers.

                 string.
                                                              og
             (b) Write a ‘C’ program using pointers to determine the length of a character


         4. Write a C program which generates array of structures, each structure represents
                                                                                                 [8+8]


            an “item” which contains item code, item name, stock in hand, unit price. Read
                                                 nty
            n items information from the keyboard. Given item code and quantity to be pur-
            chased. Calculate and point total price along with other details. [4+6+6]

         5. Write a program to read a C program le and count the following in the complete
            C program
                                         de


             (a) Total number of statements
             (b) Total number of opening brackets.                                               [8+8]
         6. What is a stack? Explain two di erent representations of a stack. List the opera-
                               u



            tions performed on a stack and write functions for implementing these operations.
                                                                                                 [16]
                           .st




         7. Write a function in ‘C’ to remove duplicate elements in a singly linked list. [16]
         8. (a) Write an algorithm to sort n numbers in ascending order using merge sort.
           w




             (b) Derive the time complexity of merge sort.                                       [8+8]
        ww




                                                     1 of 1




www.studentyogi.com                                                     www.studentyogi.com

Mais conteúdo relacionado

Destaque

Hyundai Highlights NOV2015FL final
Hyundai Highlights NOV2015FL finalHyundai Highlights NOV2015FL final
Hyundai Highlights NOV2015FL final
Jane Wu
 
Сервіси для створення сайтів
Сервіси для створення сайтівСервіси для створення сайтів
Сервіси для створення сайтів
SvetaTurbaevskaja
 

Destaque (20)

MBConsulting
MBConsultingMBConsulting
MBConsulting
 
Cm
CmCm
Cm
 
Recuerdo escolar
Recuerdo escolarRecuerdo escolar
Recuerdo escolar
 
R05010107 E N G I N E E R I N G G R A P H I C S
R05010107  E N G I N E E R I N G  G R A P H I C SR05010107  E N G I N E E R I N G  G R A P H I C S
R05010107 E N G I N E E R I N G G R A P H I C S
 
La vida de vincent (laura)
La vida de vincent (laura)La vida de vincent (laura)
La vida de vincent (laura)
 
Hyundai Highlights NOV2015FL final
Hyundai Highlights NOV2015FL finalHyundai Highlights NOV2015FL final
Hyundai Highlights NOV2015FL final
 
FinalPresentationGBSMM
FinalPresentationGBSMMFinalPresentationGBSMM
FinalPresentationGBSMM
 
Resumo. trabalho.artigo índices de inflação
Resumo. trabalho.artigo índices de inflaçãoResumo. trabalho.artigo índices de inflação
Resumo. trabalho.artigo índices de inflação
 
Resumo. o ajuste fiscal do governo dilma rousseff 2015
Resumo. o ajuste fiscal do governo dilma rousseff 2015Resumo. o ajuste fiscal do governo dilma rousseff 2015
Resumo. o ajuste fiscal do governo dilma rousseff 2015
 
Gestió de referències bibliogràfiques amb Mendeley
Gestió de referències bibliogràfiques amb MendeleyGestió de referències bibliogràfiques amb Mendeley
Gestió de referències bibliogràfiques amb Mendeley
 
Direitos de autor
Direitos de autorDireitos de autor
Direitos de autor
 
NOV2015
NOV2015NOV2015
NOV2015
 
Virxilio Viéitez
Virxilio ViéitezVirxilio Viéitez
Virxilio Viéitez
 
Сервіси для створення сайтів
Сервіси для створення сайтівСервіси для створення сайтів
Сервіси для створення сайтів
 
An interactive video and office mix presentation in Educational Management
An  interactive video and office mix presentation in Educational ManagementAn  interactive video and office mix presentation in Educational Management
An interactive video and office mix presentation in Educational Management
 
Artigo trabalho-compreenda o que é o superávit primário
Artigo trabalho-compreenda o que é o superávit primárioArtigo trabalho-compreenda o que é o superávit primário
Artigo trabalho-compreenda o que é o superávit primário
 
Present simple: basic stuff!
Present simple: basic stuff!Present simple: basic stuff!
Present simple: basic stuff!
 
La traducción del lector de pantallas gratuito NVDA y su difusión en el ámbit...
La traducción del lector de pantallas gratuito NVDA y su difusión en el ámbit...La traducción del lector de pantallas gratuito NVDA y su difusión en el ámbit...
La traducción del lector de pantallas gratuito NVDA y su difusión en el ámbit...
 
Obradoiro cartas 3º
Obradoiro cartas 3ºObradoiro cartas 3º
Obradoiro cartas 3º
 
EU's Persondataforordning i det daglige arbejde
EU's Persondataforordning i det daglige arbejdeEU's Persondataforordning i det daglige arbejde
EU's Persondataforordning i det daglige arbejde
 

Semelhante a R05010106 C P R O G R A M M I N G A N D D A T A S T R U C T U R E S

Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
Computer Programming Jntu Model Paper{Www.Studentyogi.Com}Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
guest3f9c6b
 
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
guest3f9c6b
 
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
guest3f9c6b
 
C O M P U T E R N E T W O R K S J N T U M O D E L P A P E R{Www
C O M P U T E R  N E T W O R K S  J N T U  M O D E L  P A P E R{WwwC O M P U T E R  N E T W O R K S  J N T U  M O D E L  P A P E R{Www
C O M P U T E R N E T W O R K S J N T U M O D E L P A P E R{Www
guest3f9c6b
 

Semelhante a R05010106 C P R O G R A M M I N G A N D D A T A S T R U C T U R E S (20)

R05010303 C O M P U T E R P R O G R A M M I N G A N D N U M E R I C A L M E ...
R05010303  C O M P U T E R P R O G R A M M I N G A N D N U M E R I C A L M E ...R05010303  C O M P U T E R P R O G R A M M I N G A N D N U M E R I C A L M E ...
R05010303 C O M P U T E R P R O G R A M M I N G A N D N U M E R I C A L M E ...
 
07 A1 Ec01 C Programming And Data Structures
07 A1 Ec01 C Programming And Data Structures07 A1 Ec01 C Programming And Data Structures
07 A1 Ec01 C Programming And Data Structures
 
Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
Computer Programming Jntu Model Paper{Www.Studentyogi.Com}Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
Computer Programming Jntu Model Paper{Www.Studentyogi.Com}
 
0502 Object Oriented Programming Through Java Set1
0502 Object Oriented Programming Through Java Set10502 Object Oriented Programming Through Java Set1
0502 Object Oriented Programming Through Java Set1
 
0502 Object Oriented Programming Through Java Set1
0502 Object Oriented Programming Through Java Set10502 Object Oriented Programming Through Java Set1
0502 Object Oriented Programming Through Java Set1
 
Fy secondsemester2016
Fy secondsemester2016Fy secondsemester2016
Fy secondsemester2016
 
Fy secondsemester2016
Fy secondsemester2016Fy secondsemester2016
Fy secondsemester2016
 
Fy secondsemester2016
Fy secondsemester2016Fy secondsemester2016
Fy secondsemester2016
 
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
 
05211201 Advanced Data Structures And Algorithms
05211201 Advanced Data Structures  And  Algorithms05211201 Advanced Data Structures  And  Algorithms
05211201 Advanced Data Structures And Algorithms
 
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
 
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
 
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
Computer Networks Jntu Model Paper{Www.Studentyogi.Com}
 
C O M P U T E R N E T W O R K S J N T U M O D E L P A P E R{Www
C O M P U T E R  N E T W O R K S  J N T U  M O D E L  P A P E R{WwwC O M P U T E R  N E T W O R K S  J N T U  M O D E L  P A P E R{Www
C O M P U T E R N E T W O R K S J N T U M O D E L P A P E R{Www
 
Paper
PaperPaper
Paper
 
Oops 2018
Oops 2018Oops 2018
Oops 2018
 
7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...
 
7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...
 
C g.2010 supply
C g.2010 supplyC g.2010 supply
C g.2010 supply
 
sad.pdf
sad.pdfsad.pdf
sad.pdf
 

Mais de guestd436758

Mais de guestd436758 (20)

R05010501 B A S I C E L E C T R I C A L E N G I N E E R I N G
R05010501  B A S I C  E L E C T R I C A L  E N G I N E E R I N GR05010501  B A S I C  E L E C T R I C A L  E N G I N E E R I N G
R05010501 B A S I C E L E C T R I C A L E N G I N E E R I N G
 
E C M2221 P R O B A B I L I T Y A N D S T A T I S T I C S Set1
E C M2221  P R O B A B I L I T Y  A N D  S T A T I S T I C S Set1E C M2221  P R O B A B I L I T Y  A N D  S T A T I S T I C S Set1
E C M2221 P R O B A B I L I T Y A N D S T A T I S T I C S Set1
 
R05010401 N E T W O R K A N A L Y S I S
R05010401  N E T W O R K  A N A L Y S I SR05010401  N E T W O R K  A N A L Y S I S
R05010401 N E T W O R K A N A L Y S I S
 
R05010204 E L E C T R O N I C D E V I C E S A N D C I R C U I T S
R05010204  E L E C T R O N I C  D E V I C E S  A N D  C I R C U I T SR05010204  E L E C T R O N I C  D E V I C E S  A N D  C I R C U I T S
R05010204 E L E C T R O N I C D E V I C E S A N D C I R C U I T S
 
R05010203 E L E C T R I C A L C I R C U I T S
R05010203  E L E C T R I C A L  C I R C U I T SR05010203  E L E C T R I C A L  C I R C U I T S
R05010203 E L E C T R I C A L C I R C U I T S
 
R05010302 E N G I N E E R I N G M E C H A N I C S
R05010302  E N G I N E E R I N G  M E C H A N I C SR05010302  E N G I N E E R I N G  M E C H A N I C S
R05010302 E N G I N E E R I N G M E C H A N I C S
 
R05010105 A P P L I E D M E C H A N I C S
R05010105  A P P L I E D  M E C H A N I C SR05010105  A P P L I E D  M E C H A N I C S
R05010105 A P P L I E D M E C H A N I C S
 
05210401 P R O B A B I L I T Y T H E O R Y A N D S T O C H A S T I C P R...
05210401  P R O B A B I L I T Y  T H E O R Y  A N D  S T O C H A S T I C  P R...05210401  P R O B A B I L I T Y  T H E O R Y  A N D  S T O C H A S T I C  P R...
05210401 P R O B A B I L I T Y T H E O R Y A N D S T O C H A S T I C P R...
 
05210202 F L U I D M E C H A N I C S A N D H Y D R A U L I C M A C H I...
05210202  F L U I D  M E C H A N I C S   A N D   H Y D R A U L I C  M A C H I...05210202  F L U I D  M E C H A N I C S   A N D   H Y D R A U L I C  M A C H I...
05210202 F L U I D M E C H A N I C S A N D H Y D R A U L I C M A C H I...
 
05212201 C A L I B R A T I O N A N D E L E C T R O N I C M E A S U R E ...
05212201  C A L I B R A T I O N   A N D   E L E C T R O N I C  M E A S U R E ...05212201  C A L I B R A T I O N   A N D   E L E C T R O N I C  M E A S U R E ...
05212201 C A L I B R A T I O N A N D E L E C T R O N I C M E A S U R E ...
 
05210202 Fluid Mechanics And Hydraulic Machinery
05210202 Fluid Mechanics  And  Hydraulic Machinery05210202 Fluid Mechanics  And  Hydraulic Machinery
05210202 Fluid Mechanics And Hydraulic Machinery
 
05322201 Microprocessors And Microcontrollers Set1
05322201 Microprocessors And Microcontrollers Set105322201 Microprocessors And Microcontrollers Set1
05322201 Microprocessors And Microcontrollers Set1
 
Ce052391 Environmental Studies Set1
Ce052391 Environmental Studies Set1Ce052391 Environmental Studies Set1
Ce052391 Environmental Studies Set1
 
Ce 2009 Gate Paper Prsolutions08
Ce 2009 Gate Paper Prsolutions08Ce 2009 Gate Paper Prsolutions08
Ce 2009 Gate Paper Prsolutions08
 
Downstream Processing
Downstream ProcessingDownstream Processing
Downstream Processing
 
E105309 Industrial Instrumentation Set1
E105309 Industrial Instrumentation Set1E105309 Industrial Instrumentation Set1
E105309 Industrial Instrumentation Set1
 
Ec05032 Analog Communications Set1
Ec05032 Analog Communications Set1Ec05032 Analog Communications Set1
Ec05032 Analog Communications Set1
 
212101 Object Oriented Analysis Design Through Uml
212101 Object Oriented Analysis Design Through Uml212101 Object Oriented Analysis Design Through Uml
212101 Object Oriented Analysis Design Through Uml
 
210502 Mathematical Foundation Of Computer Science
210502 Mathematical Foundation Of Computer Science210502 Mathematical Foundation Of Computer Science
210502 Mathematical Foundation Of Computer Science
 
22301 Analytical Techniques In Bio Technology Set1
22301 Analytical Techniques In Bio Technology Set122301 Analytical Techniques In Bio Technology Set1
22301 Analytical Techniques In Bio Technology Set1
 

Último

Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 

Último (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

R05010106 C P R O G R A M M I N G A N D D A T A S T R U C T U R E S

  • 1. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 1 I B.Tech Supplimentary Examinations, Aug/Sep 2008 C’ PROGRAMMING AND DATA STRUCTURES ( Common to Civil Engineering, Electrical & Electronic Engineering, Electronics & Communication Engineering, Computer Science & Engineering, Electronics & Instrumentation Engineering, Bio-Medical Engineering, Information Technology, Electronics & Control Engineering, Computer Science & Systems Engineering, Electronics & Telematics, Electronics & Computer Engineering, Aeronautical Engineering and Instrumentation & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks om 1. (a) Write the various steps involved in executing a C program and illustrate it with a help of owchart. (b) Candidates have to score 90 or above in the IQ test to be considered eligible for taking further tests. All candidates who do not clear the IQ test are sent reject letters and others are sent call letters for further tests. Represent the i.c logic for automating this task. [8+8] 2. (a) Distinguish between getchar and scanf functions for reading strings. (b) Write a program to count the number of words, lines and characters in a text. g 3. (a) How to use pointers as arguments in a function? Explain through an example. [8+8] omyo (b) Write a ‘C’ function using pointers to exchange the values stored in two loca- tions in the memory. [8+8] 4. (a) What is the use of struct keyword? Explain the use of dot operator? Give an t example for each. i.cen (b) Write a C program to accept records of the di erent states using array of structures. The structure should contain char state, population, literary rate, and income. Display the state whose literary rate is highest and whose income otgud is highest. [6+10] 5. (a) Distinguish between text mode and binary mode operation of a le. (b) Write a program to open a pre-existing le and add information at the end of le. Display the contents of the le before and after appending. [4+12] nty.s 6. Write a program to convert a given post x expression to pre x expression using stacks. [16] de w 7. Write a C program to insert and delete the elements from a circular doubly linked list. [16] w 1 of 2 stuw www.studentyogi.com www.studentyogi.com w. ww
  • 2. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 1 8. Write a C program for implementing quick sort algorithm to arrange the elements in ascending order. Demonstrate the working of quick sort algorithm for the list of integers: 40,16,23,54,36,90,7,88,66,9. [8+8] om i.c og nty u de w .st ww 2 of 2 www.studentyogi.com www.studentyogi.com
  • 3. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 2 I B.Tech Supplimentary Examinations, Aug/Sep 2008 C’ PROGRAMMING AND DATA STRUCTURES ( Common to Civil Engineering, Electrical & Electronic Engineering, Electronics & Communication Engineering, Computer Science & Engineering, Electronics & Instrumentation Engineering, Bio-Medical Engineering, Information Technology, Electronics & Control Engineering, Computer Science & Systems Engineering, Electronics & Telematics, Electronics & Computer Engineering, Aeronautical Engineering and Instrumentation & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks om 1. (a) What is an expression? What kind of information is represented by an ex- pression? (b) What is an operator? Describe several di erent types of operators that are included with in the C language with an example each. [8+8] 2. The annual examination is conducted for 50 students for three subjects. Write a i.c 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. og (c) The student who obtained the highest total marks. [5+6+5] 3. (a) What is a pointer? How is a pointer initiated? Give an example. nty (b) State whether each of the following statements is true or false. Give reasons. i. An integer can be added to a pointer. ii. A pointer can never be subtracted from another pointer. iii. When an array is passed as an argument to a function, a pointer is passed. de iv. Pointers can not be used as formal parameters in headers to function de nitions. (c) If m and n have been declared as integers and p1 and p2 as pointers to integers, u then nd out the errors, if any, in the following statements. i. p1 = &m; .st ii. p2 = n; iii. m=p2-p1; iv. *p1 = &n; [4+6+6] w 4. A company markets Hardware items. Create a structure “hwItem” that stores the title of the item, it’s price, an array of three oats 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 ww 1 of 2 www.studentyogi.com www.studentyogi.com
  • 4. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 2 original equipment manufacturer. Write a short program that provides facility to read N no. of items information, append new item, and displays all records. [16] 5. (a) List and explain various binary modes of opening a le. (b) Write a C program to read a C program le and count the total number of statements in the complete input C program. [6+10] 6. What is a Circular Queue? Explain the various operations on Circular Queues with suitable algorithms. [4+12] 7. What is Circular linked list? Explain various operations on Circular linked list with algorithms. [16] 8. (a) Write a C program to merge two sorted arrays of integers. (b) Derive the time complexity of merge sort. [8+8] om i.c og nty u de w .st ww 2 of 2 www.studentyogi.com www.studentyogi.com
  • 5. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 3 I B.Tech Supplimentary Examinations, Aug/Sep 2008 C’ PROGRAMMING AND DATA STRUCTURES ( Common to Civil Engineering, Electrical & Electronic Engineering, Electronics & Communication Engineering, Computer Science & Engineering, Electronics & Instrumentation Engineering, Bio-Medical Engineering, Information Technology, Electronics & Control Engineering, Computer Science & Systems Engineering, Electronics & Telematics, Electronics & Computer Engineering, Aeronautical Engineering and Instrumentation & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks om 1. (a) Describe in detail the execution of while statement with example. (b) Given a number, write a program using while loop to reverse the digits of the number. For e.g. 12345 should be written as 54321. (c) Write a program to compute the sum of the digits of a given integer number. [4+6+6] i.c 2. (a) Distinguish between formal variable and actual variable. (b) Distinguish between local and global variable. og (c) Distinguish between call by value and call by reference. [4+4+8] 3. (a) Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers. (b) Write a ‘C’ program using pointers to determine the length of a character nty string. [8+8] 4. (a) What are Bit elds. What are its advantages. What is its syntax. (b) Write a C program to store the information of vehicles. Use bit elds to store the status information. Assume the vehicle object consists of type, fuel and de model member elds. Assume appropriate number of bits for each eld.[8+8] 5. Write a C program to read information about the student record containing stu- dent’s name, student’s age and student’s total marks. Write the marks of each u student in an output le. [16] .st 6. Declare two queues of varying length in a single array. Write functions to insert and delete elements from these queues. [16] 7. Circular linked lists are usually set up with so-called list header. What is the reason w for introducing such a header? Write fucntions to insert and delete elements for this implementation. [4+12] ww 1 of 2 www.studentyogi.com www.studentyogi.com
  • 6. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 3 8. (a) By hand, trace the action of heap sort on the following lists. Draw the initial tree to which the list corresponds. Show how it is converted into heap and show how the resulting heap as each entry is removed from the top and the new entry inserted. 12 20 34 27 30 36 23 (b) Discuss the advantages and disadvantage of all sorting techniques with exam- ple. [8+8] om i.c og nty u de w .st ww 2 of 2 www.studentyogi.com www.studentyogi.com
  • 7. www.studentyogi.com www.studentyogi.com Code No: R05010106 Set No. 4 I B.Tech Supplimentary Examinations, Aug/Sep 2008 C’ PROGRAMMING AND DATA STRUCTURES ( Common to Civil Engineering, Electrical & Electronic Engineering, Electronics & Communication Engineering, Computer Science & Engineering, Electronics & Instrumentation Engineering, Bio-Medical Engineering, Information Technology, Electronics & Control Engineering, Computer Science & Systems Engineering, Electronics & Telematics, Electronics & Computer Engineering, Aeronautical Engineering and Instrumentation & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks 1. (a) What is the conditional operator. What is its general syntax. om (b) Write a C program to nd the largest of three input numbers using conditional operator. [8+8] 2. (a) What do you mean by functions? Give the structure of the functions and explain about the arguments and their return values. i.c (b) Write a C program that uses a function to sort an array of integers. [8+8] 3. (a) Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers. string. og (b) Write a ‘C’ program using pointers to determine the length of a character 4. Write a C program which generates array of structures, each structure represents [8+8] an “item” which contains item code, item name, stock in hand, unit price. Read nty n items information from the keyboard. Given item code and quantity to be pur- chased. Calculate and point total price along with other details. [4+6+6] 5. Write a program to read a C program le and count the following in the complete C program de (a) Total number of statements (b) Total number of opening brackets. [8+8] 6. What is a stack? Explain two di erent representations of a stack. List the opera- u tions performed on a stack and write functions for implementing these operations. [16] .st 7. Write a function in ‘C’ to remove duplicate elements in a singly linked list. [16] 8. (a) Write an algorithm to sort n numbers in ascending order using merge sort. w (b) Derive the time complexity of merge sort. [8+8] ww 1 of 1 www.studentyogi.com www.studentyogi.com