Community Sites
Create your own community website and start earning today !
It's Free !
 
Communities Members BookmarksPolls Fresher Jobs Funny Pictures MCA Projects New Member FAQ  



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Download Model question papers & previous years question papers

Posted By: SajithkumarS       Member Level: Diamond       Posted Date: 07 Jan 2008

2003 Guru Gobind Singh Indraprastha University Introduction to Computers Question paper



Course:   University: Guru Gobind Singh Indraprastha University




Paper Code : ETCS – 109 Subject : Introduction to Computers

Time : 3 Hours
Maximum Marks : 75

Note : Attempt any 5 questions in all.





Q1
Text files created by text editors usually contain characters and are not executable files. Virus programmers are however executable files. Text files recovered through email often contain viruses. Which feature of text editors/word processors such as MS-WORD make them vulnerable to viruses? 1

( i ) Solve using 'n's compliment in the number system given. 1
(553)8 - (671)8
( ii ) Solve using 'n-1's compliment. 1
(-42)10 – (19)10
( iii ) Solve using 2's compliment. 2
(52)10 – (AB)16 + (-C2)16 + (24)8

What is the difference between free ware, shareware and limited edition software? 2

What is a function prototype. What if any is the difference between the following prototype decelerations:
( i ) float fime ( ); (ii) float func (void);
Find where do you get prototype decelerations for standard library function? 3

What service does an FTP client offer that a web browser does not? 1

What is th union data type and when it is used? When union members are of different data types, what will be the size of the union itself? 2

To which program does the main ( ) return its value and what is its use? What are the parameters of main ( )? 2




Q2
Given below are some program fragments. Examine them to identify any logical error(s) and make suitable corrections, justifying your answer.

(a) This function copies a source string to a target string, but removes all trailing blanks, tabs and newlines: 4

Char *copystr(char s[])
{
char *t;
int n,i=0;
for(n-strlen(s)-1),n>=0;n--)
if(s[n]!=''||s[n]!=]'\t'||s[n]!=]'\n')
break;
while(i<=n)
t[i++]=s[i++];
return t;
}
(b) This program defines a macro to find the cube of a number and uses it in the main program: 3

# define cube(x)=x*x*x
main()
{
float z;
scanf("%f",z);
printf("%f",cube(z+1);
}(c) This function swaps the content of two character pointers and returns the number of times this function has been called so far: 4

int swap and report (char *s1,char *2)
{
int count=0;
char temp;
temp=*s2;
s2=s1;
*s1=temp;
return count++;
}(d) This function allows a user to repeatedly input a number till she enters 'N' to a question. 4

int getnum()
{
char ans; int num;
while(ans!='N') {
printf?("Any more numbers?\n");
if((ans=getchar())!='N'&&ans!='n')
num=getchar(); }
return num;
}


Q3
Write (1) an iterative function (2) a recursive function for calculating the factorail of a number. Compare the two versions in terms of : 5
(i) Total number of function calls.
(ii) Maximum number of local variables stored during the execution of the program.

Write a recursive function which reverses a string between given start and end positions. 5

Enumerate three advantages of writing C programs as a collection many small functions. 5

Q4
What is the output of the following program? The user inputs the strings “Indraprastha” and “University”.7





#include
#include
int main(void)
{
char s1[80],s2[80];
char *c;
scanf("%s",s1);
scanf("%s",s2);
printf("Lengths of the two strings are: \n%d%d
\n",strlen(s1),strlen(s2));
strcat(s1,s2);
printf("%s\n",s1);
if(strchr(s2,'a')) printf("a is in %s\n",s2);
c=strstr(s1,"Univ");
printf("%s\n",c);
return 0;
}Write a program which allows the user to input lines of text till she enters a 'O' (the program should display prompts to do this). After inputting all the lines, the program redisplays the lines entered. 7

An array has been initialised as int arr[4][3]={0,1,2,3,4,5,6,7,8,9,10,11}; Write the contents of the following:- 3

arr[1][1]

*((int*)txt+5)

*((int*)(&txt[3]+1)

Q4
What are the standard I/O streams opened automatically when a program starts execution. Write the prototype of the library function which redirects a standard I/O stream from/to a new file. Give an example where the standard output has been redirected to a file named “Result”. 3

Write a program which reads a file, reverses each word in it (words are separated by blanks, full-stops, newlines and tabs), and outputs them to another file. 8

Write a program which changes every 10th byte of a file to the character '$', starting from the beginning of the file. 4

Q6
Explain the different types of accesss modifiers in C. 4

Write a program which inputs a short integer and prints its multiples in powers of 2, using shift operators. Take care that there are no overflows. 6

Write a function that executes an infinite loop, within which it inputs a string. Compares it with a string placed as its parameter and comes out of the loop only is a match is obtained. 5

Q7
Make a flowchart for sorting an array of numbers in ascending order, using any algorithm. 5

Write short notes on: 6

The DOS and Unix operating systems

The world wide web

Explain the following constructs, illustrating their uses:- 4

The ? “alternative” operator in C.

The break, continue and the default options in case statement.






Return to question paper search

Next Question Paper: IV Semester B.A./B.Sc. Examination, May/June 2007

Previous Question Paper: Applied Physics-I

Related Question Papers:


  • ETCH – 105 Subject : Applied Chemistry-I


  • Total Quality Management


  • Managing Change In Organizations


  • mgt function


  • Analog Electronics II


  • Categories


    Submit Previous Years University Question Papers and make money from adsense revenue sharing program

    Are you preparing for a university examination? Download model question papers and practise before you write the exam.

    Watch TV Channels



    Contact Us    Editors    Privacy Policy    Terms Of Use   

    SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.