Search This Blog

Friday, September 9, 2016

UNIX MODEL PAPER

PVP-14  
Code : IT5T1

III B.Tech – I Semester- Regular Examination
UNIX
Model Paper
Duration: 3 hours                                                                                            Max. Marks: 70
PART - A
Answer all the questions. All questions carry equal marks
            11 x 2 = 22M

a)      Summarize  the features of UNIX? (L2) -CO1
b)      Compare cp and mv commands with example? (L2) -CO1
c)      Demonstrate the following commands a) who b) uniq. (L2) -CO1

d)     Demonstrate $# variable in bourne shell. (L3) –CO2
e)      Calculate ((2+3\2)*3) using expr. (L3) –CO2

f)       Write the syntax of opendir? (L2) –CO3
g)      Explain fseek system call. (L2) –CO3

h)      Illustrate fork system call? (L3) –CO4
i)        Demonstrate zombie process? (L3) –CO4

j)        Give example for sleep function. (L2) –CO5
k)      Discuss advantages of Named Pipes. (L2) –CO5

PART-B
Answer any THREE questions. All questions carry equal marks      3 x 16 = 48M

2. a) Discuss briefly on the following UNIX commands(L2) -CO1                                      8M
       i) date                   ii) ps                iii) cat              iv) man
    b)  Explain briefly about file permission in UNIX (L2) -CO1                                           8M

3.  Summarize  control structures in Bourne shell(L3) –CO2                                   16M

4.  Discuss the following with suitable example(L2) –CO3                                                 16M
      i) fopen ()              ii) fflush ()                   iii) fgetc ()       iv) putc ()

5. a) Demonstrate  different states in process structure(L3) –CO4                                        8M
    b) Classify System Calls and Illustrate any four system calls with examples(L3) –CO4   8M

6. Demonstarte Inter Process Communication with suitable example (L2) –CO5               16M



  

UNIX- UNIT-2 NOtes

UNIX UNIT-1 Notes

Thursday, August 4, 2016

Unix Lab Sheet Queations

UNIX LAB Ex1a. Basic Utilities
Commands to be covered are who,date,cal,tty,bc,clear etc
1.           Print the name of the Present Working Directory?
2.           Print today’s date and time?
3.           Print today’s date and time in different formats?
4.           Print the information about the users?
5.           Create empty files using “touch” utility?
6.           List all the files in current directory?
7.        Perform calculations using cal
8.        Clear the Contents of Screen
9.         Print the calendar for the year 205
10. Print the type of Terminal
Ex1b: File Related Utilities
Commands to be covered are
Cat, cp,mv,rm,cmp,diff,comm.,touch,wc,uniq,head,tail etc
1.Create a file using cat
2.Add Some Contents to existing file
3.Display the contents of the file
4.Copy one file contents to another file
5.Copy one file from one directory to another directory
6.move file from one directory to another directory
7.Compare two files
8.Print the commonalities for given files
 9.Differentiate two files
10.Create empty files using touch
11. Count the number of characters, number of words, and number of lines in file
12.Print first 3 lines in a given file
13.Print last 3 lines in a given file
14. Print non-repeated lines from the given file?
15.Print only the repeated lines from given  file?
16.Print number of occurrences of each line in given file

Exercise 2a Security and File Permissions
Commands to be covered are ls –l,chmod,chgrp,chown,ulimit,umask etc
1.Print long listing of files.
2.chage permissions for given file.
3.Change Owner name for given file.
4.Change group name for given file.
2b:Disk Utilities
Commands to be covered are df,du,mount,unmount,ulimit,finger
  1. Mount a file system.
2.           Un-mount the file system which you have mounted.
3.           Display the boundaries for the different types of variables and memory and sizes.
4.           Display the disk usage in terms of block sizes and trace the most size allocated one.
5.           Set the limit for file

2C  Process Utilities: Commands to be covered are ps,fg,bg,kill
 1.Show the status of running processes
2.Print the background running processes
3.Print the foreground running processes
4.Kill the running process.
Ex 3 Text Processing Utilities:
Commands to be covered are grep,egrep,fgrep,cut,paste,tee etc
1.Display first four characters in a file
2.Display 5-10 character in a file
3.Display first and third field in a file
4.Display only second field in a file
5.join two files
6. Redirect the output into another file
7. Join Two files horizontally
8.Join Two files vertically
9.Search and display all instances of pattern in file
10. Count the number of instances of pattern in file
11. Search in multiple files
12. Display the file name when searching in multiple files
13. Suppress display of file name when searching in multiple files
14. Case-Sensitive search
15. Case-Insensitive search
16. Stop search after certain occurrences
17. Display line number for every match
18. Search for whole word
19.Display N lines after match
20.Display N lines before match 
21.Searching in all files recursively using grep –r
22.Display the lines which does not matches all the given pattern.
23.Display only the file names which matches the given pattern using grep –l
24.Show only the matched string

25.Show the position of match in the line

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

Sunday, February 21, 2016

CP UNIT WISE IMPORTANT QUESTIONS

CP PVP-14 UNIT-1 Notes

CP PVP-14 UNIT-II Notes

CP PVP-14 UNIT III NOTES

CP PVP-14 UNIT IV NOTES

CP PVP-14 UNIT V notes