OCT /NOV-2011 (C-05)



C-05-CM-304
237
BOARD DIPLOMA EXAMINATION, (C-05)
OCT /NOV-2011
DCME.-III SEMESTER EXAMINATION
UNIX & C

TIME: 3 Hours]                                                                     [Total Marks :40]
PART   - A
INSTRUCTION:  (1) ANSWER ALL QUESTION AND EACH QUESTION
                                           CARRIES FOUR MARKS
                    (2)  ANSWER SHOULD BE BRIEF AND   STRAIGHT      TO  THE POINT AND SHALL NOT EXEED FIVE SIMPLE SENTENCES

1.     List any two features of multi user operating system and give two examples.
2.     Write the use of head, tail commands.
3.     Explain grep command with example.
4.     State the importance of stdin, stdout, stderrr.
5.     What is conditional operator?
6.     What is a static variable
7.     List any four symbols used in flow chart.
8.     Define self referential structure.
9.     Define MACRO with example.
10.  List bitwise logical operators with examples.

Instructions :    (1) Answer any five questions and each question carries ten marks.
                  (2) The answers should be comprehensive and the criteria for valuation   is the content but not the length of the answer.

11.   (a) explain about unix file system. (b) explain working of the following directory commands each with an example. (i) cd, (ii) mv, (iii) cp, (iv) rm
12.   (a) write a shell script to generate Fibonacci series. (b) write a shell script to find the sum of 10 numbers using for loop
13.   (a) differentiate between algorithm and flowchart. (b) write a c program to find the length of the given integer.
14.   (a) explain conditional operator in c languge. (b) explain increment and decrement operator in c language. (c) list various comparision operators in c language with examples
15.   (a) explain switch statement. (b) write a c program to print multiplication table from 1 to 10
16.   (a) explain recursion technique with an example program (b) write the syntax of while and do-while loops and explain essential difference between them.
17.   Write a c program for two matrix multiplication using arrays.
18.   Explain the following preprocessing features. (i) include, (ii) define, (iii) ifdef, (iv) ifndef




OCT /NOV-2011 (C-05)



C-05-CM-304
237
BOARD DIPLOMA EXAMINATION, (C-05)
OCT /NOV-2011
DCME.-III SEMESTER EXAMINATION
UNIX & C

TIME: 3 Hours]                                                                     [Total Marks :100]
PART   - A
INSTRUCTION:  (1) ANSWER ALL QUESTION AND EACH QUESTION
                                           CARRIES FOUR MARKS
                    (2)  ANSWER SHOULD BE BRIEF AND   STRAIGHT      TO  THE POINT AND SHALL NOT EXEED FIVE SIMPLE SENTENCES

1.     State the importance of multiuser operating system. Give two examples.
2.     Write the use of cp and mv commands.
3.     List and explain any two types of files used in UNIX.
4.     Write about chmod command with example.
5.     List any four basic data types used in c along with their storage classes.
6.     Define flow chart and list any two advantages of flowcharts.
7.     Write about arithmetic operators in c language with examples
8.     Distinguish between local and global variables.
9.     Distinguish between structure and union
10.  Write about bitwise shift operators

Instructions :    (1) Answer any five questions and each question carries ten marks.
                  (2) The answers should be comprehensive and the criteria for valuation   is the content but not the length of the answer.

11.  (a) list any six differences between algorithm and flowchart. (b) explain egrep command with suitable example.
12.  Explain about head and tail filters in Unix with an example
13.  (a) explain the usage of a static variable using a simple program. (b) explain the concept of pointer to functions.
14.  (a) explain for loop with example in c. (b) write a program to find whether given number is palindrome or not.
15.  (a) explain recursion technique with example. (b) explain break and continue statements with example.
16.  Explain various storage classes available in c language.
17.  (a) differentiate address operator and de-referencing operator. (b) write a switch statement to find whether a given character is vowel or not.

OCT /NOV-2010 (C-09)



BOARD DIPLOMA EXAMINATION, (C09)

OCT /NOV-2010
DCM-I YEAR EXAMINATION
COMPUTER FUNDAMENTALS & PROGRAMMING IN “C”2009

TIME: 3 HOURS                                                                              TOTAL MARKS:80

           
Time :3 Hours                                                                                       (Total Marks :100
1.      State the use of Secondary Storages Devices used in a Computer. List any two 2+1 devices.
2.      Convert the following :                                                                                                        3
(1011100111110.01100)2 = (?)10
3.      Define a File and list any two File types.                                                              1+2
4.      Write any three difference between Internet and intranet.                                         3
5.      Draw the flowchart to print the numbers between 1 to 10.                                       3
6.      List the rules for naming an Indentifier.                                                                     3
7.      Define a String and List any four String functions.                                                 1+2
8.      What is the purpose of calloc() function and give it’s syntax?                                2+1
9.      Give any three differences between structure and union.                                                                      3
10.  List the input functions for reading data from a file.                                                               3
PART-B                                      10*5=50


Instructions :    (1) Answer any five questions and each question carries ten marks.
                  (2) The answers should be comprehensive and the criteria for valuation   is the content but not the length of the answer.

11.   (a) Explain the function of the CPU and major functional blocks of CPU.                            4+3
 (b) What is the need of Cache memory ?
12.   What is meant by disk Defragmentation ? What is its use and how to Defragment using System tools ?        2+2+6
13.   (a) Explain about IP address and write its format                                                                  3+3
(b) What is meant by search engine and list any two search engine                             2+2
14.  (a) Write any three important features of C language.
(b) Write a C program to find the roots of a quadratic equation ax2+ bx+c.                  7
15.  (a) Give the syntaxs of iterative statements.                                                                   6
      (b) Write a C program to check whether the given numbers is perfect number or not 4
16. (a) Write  C program to find the largest number in a single dimension Array.        5
      (b) Write a C program to check whether the given string is palindrome or not.                5
17. (a) Write any four differences between call by value                                                                   4
      (b) Write a C program to print Fibonacci numbers upto                                                6
18. (a) Write any three advantages of pointers                                                                   3
      (b) Write a C program to check whether the given matrix is symmetric or no.               7
Answers:
Short:
1.      State the use of Secondary Storages Devices used in a Computer. List any two 2+1 devices.
2.      Convert the following :                                                                                                        3
(1011100111110.01100)2 = (?)10
3.      Define a File and list any two File types.                                                              1+2
4.      Write any three difference between Internet and intranet.                                         3
5.      Draw the flowchart to print the numbers between 1 to 10.                                       3
6.      List the rules for naming an Identifier.                    
Ans:
Identifier: identifier is nothing but giving the name to the variable, function name is known as the identifier
RULES OF THE IDENTIFIER:
1.       It should start with alphabetical letters only
2.       It should not star with numbers, special symbols
3.       It should not exist more than 32 characters
Key words are not used as variables
7.      Define a String and List any four String functions.                                                 1+2
8.      What is the purpose of calloc() function and give it’s syntax?                                2+1
9.      Give any three differences between structure and union. 
Structure
Union
4.       Structure stores different types of data in different locations. That is each member within a structure is assigned its own unique storagr area.
5.       All members can be accessed at a time
6.       The memory size of the structure variable is the sum of the sizes of its members.

4.       Union stores different types of data in a single memory location tha are the members that compose    a union all share the same storage area.
5.       Only one member of the union  and thus one data type can be accessed  at any one time
6.       The memory size of the union variable is the largest size of its members
                                                                   
10.  List the input functions for reading data from a file.                                                              
Long

11.   (a) Explain the function of the CPU and major functional blocks of CPU.                            4+3
 (b) What is the need of Cache memory ?
12.   What is meant by disk Defragmentation ? What is its use and how to Defragment using System tools ?        2+2+6
13.   (a) Explain about IP address and write its format                                                                  3+3
(b) What is meant by search engine and list any two search engine                             2+2
14.  (a) Write any three important features of C language.
(b) Write a C program to find the roots of a quadratic equation ax2+ bx+c.                  7
15.  (a) Give the syntaxs of iterative statements.                                                                   6
      (b) Write a C program to check whether the given numbers is perfect number or not 4
16. (a) Write  C program to find the largest number in a single dimension Array.        5
      (b) Write a C program to check whether the given string is palindrome or not.                5
17. (a) Write any four differences between call by value and call by address
Call by value
Call by reference
1.       The variable/value/expression is sent to the function is known as call by value.
1.       If the address is sent to the function it is known as call by reference
2.       Syntax: function(variable,variable2);
3.       Syntax:function(&variable,&variable2);
4.here formal parameters is variable
Ex: intx
4.       Here formal parameters is pointers
Ex:int*x
5.       If the value is sent to the function ,that value cannot be modified
6.       Whenthe address is sent to the function the value is modified by using ‘*’operator

      (b) Write a C program to print Fibonacci numbers upto  n
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,n,I;
clrscr();
a=0; b=1;
printf(“how many no’s\n”);
scanf (“%d”,&n);
printf(“fibnoccie series are\n”);
printf(“%d\n%d\n”,a,b\n”);
for (i=1;I<=n-2;i++)
{
c=a+b;
printf(“%d\n”,c);
a=b;
b=c;
}
getch ();
}                                 
18. (a) Write any three advantages of pointers                                                                   3
Ans:
  1. Indirect accessing
  2. fast execution
  3. Dynamic memory allocation.
  4. saving the time
We can return more than one value.
      (b) Write a C program to check whether the given matrix is symmetric or no.               7

APRIL/MAY 2010



3025
BOARD DIPLOMA EXAMINATIONS  APRIL/MAY 2010
D.C.M.E. –FIRST YEAR EXAMINATION
COMPUTER FUNDAMENTALS & PROGRAMMING IN ‘C’
TIME: 3 Hours                                                             Total Marks: 80
PART-A                                              10*3=30
Instructions: (1) Answer all questions. Each question carries three marks.
                     (2) Answers should be brief and straight to the point and shall not exceed five simple sentences

1)     list the major functional blocks of CPU
2)     write about word length
3)     what is the need of an Operating system
4)     what is web browser? Give two examples of web browsers
5)     list any three advantages of flow chart
6)     list any four important features of C language
7)     write any three differences between variable and array
8)     write any thee differences between address operator and de referencing operator
9)     what is self referential structure? Give an example of self referential structure declaration
10)  list bitwise operators in C with their meaning?
PART-B                                      10*5=50

Instructions :(1) Answer any five questions and each question carries ten marks.
                  (2) The answers should be comprehensive and the criteria for valuation   is the content but not the length of the answer.
11. Explain generations of computers
12 (a).write a C program to generate 10 fibonacci numbers
(b).write short notes on
(i). malloc ( )
 (ii). Calloc( )
13. Explain procedure to change resolution, color appearance and screen saver options of the display
14. explain the process of sending and receiving email
15. explain about syntax of :
(a)    if- statement
(b)   if –else statement
(c)    nested-if statement in C
16.(a). write a C program to check whether a given number is palindrome or not?
17. write a C program to add two matrices
18. write a C program to print multiplication table of a given number using function
Answers:
Short
1)     list the major functional blocks of CPU
2)     write about word length
3)     what is the need of an Operating system
4)     what is web browser? Give two examples of web browsers
Ans:
A web browser is a software program developed to provide a friendly interface on the web.
Browsing or surfing refers to getting information on internet. surfing on internet is done by programs which are called ‘Browsers’

Ex~
  www.google.com

5)     list any three advantages of flow chart
Ans:
1. It provides an easy way of communication because any other person besides the programmer can understand the way they are represented.

2. It represents the data flow.

3. It provides a clear overview of the entire program and problem and solution.

4. It checks the accuracy in logic flow.

5. It documents the steps followed in an algorithm.

6. It provides the facility for coding.

7. It provides the way of modification of running program.
6)     list any four important features of C language
7)     write any three differences between variable and array
8)     write any thee differences between address operator and de referencing operator
9)     what is self referential structure? Give an example of self referential structure declaration
10)  list bitwise operators in C with their meaning?

Long
11. Explain generations of computers
12 (a).write a C program to generate 10 fibonacci numbers
Ans:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,n,I;
clrscr();
a=0; b=1;
printf(“how many no’s\n”);
scanf (“%d”,&n);
printf(“fibnoccie series are\n”);
printf(“%d\n%d\n”,a,b\n”);
for (i=1;i<=n-2;i++)
{
c=a+b;
printf(“%d\n”,c);
a=b;
b=c;
}
getch ();
}

(b).write short notes on
(i). malloc ( )
 (ii). Calloc( )
Ans:
malloc()
It is used to the create the array at runtime. It is predefined in <alloc.h>.
 Syntax:
 pointer=(type casting)malloc(type);

calloc()
It is also similar to malloc() which creates array variable, structures with zeros (0’s)
Ex~    int  *a;
           a=(int *)calloc(3,size of(int));

13. Explain procedure to change resolution, color appearance and screen saver options of the display
Ans:
CHANGING SCREEN RESOLUTION:
                        Resolution is a unit to determine the quality to displayed or priented text and graphics .text and pictures on the display are formed by dots called ‘pixels’.
      Resolution is measured in dpi ( dot per inch ).the most common screen resolutions are 640*480 pixels and 800*600 pixels.

PROCEDURE TO CHANGE RESOLUTION:
            Right click with mouse on a blank area of the desktop and point to properties and click.
·         The display dialogue box appears
·         Click the setting tab
·         To change the screen resolution,drag the slider to select the resolution you want to use.
·         You will notice as you move the slider towards higher resolutions that the number of colors displayed in the colors box changes
·         The preview box in the dialogue box displays how your screen will look at the new screen resolution
·         Click ok to confirm your change .a dialogue box appears ,stating that windows will take a few seconds to change the screen resolution .your screen may flicker during this time.
·         The monitor setting dialogue box appears,asking if you want to keep the new screen resolution

COLOUR APPEARANCE  :

·         Right click on blank area on your desktop,a menue appears
·         Click properties .the ‘display  properties’ dialogue box appears .
·         Click the appearance tab .the appearance tab showshow the screen currently looks
·         Click the scheme drop-down list display a list of the available color schemes
·         Click the color scheme you require
·         Select any of the following options based on your requirements
·         To change the color of the individual item ,for example ,to change desktop from the item drop-down list
·         Click color drop-down list and choose appropriate color of your choice
·         Click on ok to confirm your changes

SCREEN SAVER :

A screen saver automatically appears when you don’t use your computer  for a period of time

TO CHANGE A SCREEN SAVER,FOLLOW THESE STEPS :

·         Right click with mouse on a blank area of the desktop .a menu appears.
·         Click properties.The display properties dialogue box appears
·         Click the screen saver tab.the screen saver tab contains the following options

·         Screen saver lists the available  screen savers

·         Setting allows you to set the speed and density of the pattern of the screen saver

·         Preview .click this button to get the full screen view of the selected screen saver .to return the dialogue box ,move your mouse or  press any key on the keyboard

·         Password protected allows you to require a password before allowing access beyond the screen saver until the correct password is given

·         Change allows you to change the oassword

·         Wait sets the amount of time before the screensaver is activated

Click ok confirm your changes

14. explain the process of sending and receiving email
·         You can create and send an e-mail message to exchange ideas or request information

TO SEND AN E-MAIL MESSAGE ,FOLLOW THESE STEPS :
·         On the tool bar,click the new mail button
·         In the to and 1 or cc boxes ,type the e-mail name of each recipient ,separating names with a comma or semicolon (;)

To: send the message to each person you specify
·         In the subject box,type a message title
·         Type your message,and then click the send button on the new message toolbar


RECEIVING E-MAIL :

The inbox stores all the e-mail messages you receive.you can display the contents of the message to read the message
·         Click the inbox icon either on the outlook bar or the folder list
·         To view the message on the preview plane ,click the message in the message list


15. explain about syntax of :
(a)    if- statement
(b)   if –else statement
(c)    nested-if statement in C
16.(a). write a C program to check whether a given number is palindrome or not?
Ans:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[6],b[6];
printf(“enter any string\n”);
fflush(stdin);
gets(a);
strcpy(b,a);
if(strmp(a,strrev(b))==0)
{
 printf(“palindrome”);
}
else
{
 printf(“not a palindrome”);
}
getch();
}
17. write a C program to add two matrices
18. write a C program to print multiplication table of a given number using function