How To Exam?

a knowledge trading engine...


Guru Gobind Singh Indraprastha Vishwavidyalaya 2009-1st Sem B.Tech Introduction to Computers,[] - Question Paper

Wednesday, 29 May 2013 12:05Web

Q1

1.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

2.( i ) Solve using 'n's compliment in the number system provided. 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

3.What is the difference ranging from free ware, shareware and limited edition software? 2

4.What is a function prototype. What if any is the difference ranging from the subsequent prototype decelerations:

( i ) float fime ( ); (ii) float func (void);

obtain where do you get prototype decelerations for standard library function? 3

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

6.What is the union data kind and when it is used? When union members are of various data types, what will be the size of the union itself? 2

7.To which program does the main ( ) return its value and what is its use? elaborate the parameters of main ( )? 2

Q2Given beneath are a few program fragments. Examine them to identify any logical error(s) and make suitable corrections, justifying your ans.
(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 describes a macro to obtain the cube of a number and uses it in the main program: 3
# describe cube(x)=x*x*x
main()
{
float z;
scanf("%f",z);
printf("%f",cube(z+1);
}
(c) This function swaps the content of 2 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 ques.. 4
int getnum()
{



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Guru Gobind Singh Indraprastha Vishwavidyalaya 2009-1st Sem B.Tech Introduction to Computers,