Search This Blog

Thursday, April 28, 2016

PVP14 CP MODEL PAPER see once

                                                                                                                     PVP14
I.B.TECH   II SEMESTER
                                 C-Programming (EE2T6,ME2T6,IT2T6)
Model Paper
TIME: 3 HRS                                                                            MAX MARKS 70
PART A
Answer all Questions:                                                                          11x2=22
1. a)  What is difference between Compiler and Interpreter.
    b) List the rules for declaring variable.
   c) What is use of exit() function.
   d) Differentiate break and continue.
   e) Why we use Arrays?
   f) Define function and write any two advantages.
   g) Define recursion.
   h) Write advantages of pointers.
   i) Explain #define directive.
   j) What is a structure in C? How is a structure declared?
   k) What is the use of fseek()?
PART B
Answer Any Three Questions.                                                          3x16=48                                                                             
2. a) Explain Structure of  C Program.                                                   7M
    b) Explain any three operators with example.                                    9M

3. a)Compare and contrast for,while,do-while.                                      9M             
    b) List Basic String functions explain  any four functions.                  7M                     

4. a)Compare Call by Value and Call by Reference.                                8M
    b)Discuss Storage Classes with examples.                                           8M

5. a) With the help of examples Explain Dynamic Memory Allocation                                                                                                                                            8M
    b)Give Examples for #include,#define                                                 8M

6. a)Differentiate between Structure and Union.                                        8M

    b)Explain File I/O                                                                                 8M

HOW TO WRITE ANSWERS IN THE EXAM

CALL BY VALUE AND REFERENCE PROGRAMS


RECURSION ADVANTAGES AND DISADVANTAGES

What are recursive functions? What are the advantages and disadvantages of Recursive algorithms?

A recursive function is a function which calls itself.
Advantages of recursive functions:
-Avoidance of unnecessary calling of functions.
-A substitute for iteration where the iterative solution is very complex. For example to reduce the code size for Tower of Honai application, a recursive function is best suited.
- Extremely useful when applying the same solution

Disadvantages of recursive functions :
-A recursive function is often confusing.
-The exit point must be explicitly coded.

-It is difficult to trace the logic of the function.

APRIL 2016 Supply Paper Solutions

1.Addition of two numbers without using +
#include<stdio.h>
 int main() {
   int num1 = 10, num2 = 5;
   num1 = num1 - (-num2);
   printf("Sum is : %d",num1);
   return (0);
}

2.Max of three numbers using ternary operator
Void main()
{
Int a=5,b=6,c=10,max;
Max=((a>b)&&(a>c)?a:((b>c)?b:c));
Printf(“Max is %d”,max);
Getch();
}
3.print the average of n numbers in the array and pass array to function
#include<stdio.h>
void print(int a[10],int);
int main()
{
               int a[10],n=5;
               print(a,n);
               return 0;
              
}
void print(int a[10],int n)
{
               int i,sum=0;
               for(i=0;i<n;i++)
               {
                              printf("Enter element into array");
                              scanf("%d",&a[i]);
                              sum=sum+a[i];
               }
               printf("Average of array is %d",sum/n);
}



IMPORTANT QUESTIONS SHORT FORM




Tuesday, April 26, 2016

EXTRA CLASS

DEAR STUDENTS
PLEASE ATTEND EXTRA CLASS ON 28-04-2016 at room no 323 IBM LAB
from 8AM TO 5PM
call me 9030845608 

PVP14 April 2016 Supply Paper for AE and ECE


Prepare this paper may be repeat on 30th april forward to your friends not guarantee

CP PVP14 AND PVP12 IMPORTANT QUESTIONS

UNIT I
1.Structure of C Program
2.C DataTypes
3.Operators
4.C Tokens
UNIT II
1.Various IF Statements(simple if,if-else,if-else-if ladder etc)
2.Switch (Multiway selection)
3.Examples on for loop while loop and do-while loop
4.String built-in functions(Strcmp,strcpy etc)
UNIT-III
1.Types of functions
2.Storage Classes
3.Recursion
UNIT-IV
1.Pointer Basics
2.Dynamic memory allocation
3.Preprocessor Basics
UNIT-V
1.Differences Between Structure and Union
2.FIle OPerations
3.Command line arguments

ALL OF U MUST READ UNIT1 ,3,4