Saturday, August 20, 2011

PRODE qn paper.....nd key :)


INFORMATION TECHNOLOGY STUDENT ASSOCIATION
(ITSA) 2011-12
EVENT: PROGRAMMING AND DEBUGGING 
Duration: 30 mins
N0.of questions: 25

1. In a function that receives variable number of arguments the fixed arguments passed to the
function can be at the end of argument list.
A. True B. False C. Maybe D.none
2. What will be the output of the program (sample.c) given below if it is executed from the
command line (turbo c under DOS)?
cmd> sample Good Morning
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%d %s", argc, argv[1]);
return 0;
}
A. 3 Good B. 2 Good C. Good Morning D. 3 Morning
3.Point out the error in the following program.
#include<stdio.h>
#include<stdarg.h>
int main()
{
void display(char *s, int num1, int num2, ...);
display("Hello", 4, 2, 12.5, 13.5, 14.5, 44.0);
return 0;
}
void display(char *s, int num1, int num2, ...)
{
double c;
char s;
va_list ptr;
va_start(ptr, s);
c = va_arg(ptr, double);
printf("%f", c);
}
}
A. Error: invalid arguments in function display() B. Error: too many parameters
C. Error: in va_start(ptr, s); D. No error
4. What will be the output of the program ?
#include<stdio.h>
#include<string.h>
int main()
{
char str[] = "GITAM\0\ITSA\0";
printf("%s\n", str);
return 0;
}
A. ITSA B . GITAM C . GITAM ITSA D. GITAM \0 ITSA
5. Which header file should be included to use functions like malloc() and calloc()?
A. memory.h B. stdlib.h C. string.h D. dos.h
6. What will be the output of the program ?
#include<stdio.h>
int main()
{
int a=250;
printf("%1d\n", a);
return 0;
}
A. 1250 B. 2 C. 50 D. 250
7. What will be the output of the program ?
#include<stdio.h>
int main()
{
printf("%c\n", ~('C'*-1));
return 0;
}
A) A B) B C) C D) D
8. A long double can be used if range of a double is not enough to accommodate a real number.
A. True B. False C. Maybe D. none
9. What will be the output of the program in Turbo C (under DOS)?
#include<stdio.h>
int main()
{
struct emp
{
char *n;
int age;
};
struct emp e1 = {"Dravid", 23};
struct emp e2 = e1;
strupr(e2.n);
printf("%s\n", e1.n);
return 0;
}
A. Error: Invalid structure assignment B. DRAVID
C. Dravid D. No output
10. When we dynamically allocate memory is there any way to free memory during run time?
A. free() B . malloc() C. calloc() D. cannot
11. What will be the output of the program?
#include<stdio.h>
int main()
{
char far *near *ptr1;
char far *far *ptr2;
char far *huge *ptr3;
printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3));
return 0;
}
A. 4, 4, 8 B. 4, 4, 4 C. 2, 4, 4 D. 2, 4, 8
12. Which statement is true?
A. Memory is reclaimed by calling Runtime.gc().
B. Objects are not collected if they are accessible from live threads.
C. An OutOfMemory error is only thrown if a single block of memory cannot be found that
…………………………is large enough for a particular requirement.
D. Objects that have finalize() methods always have their finalize() methods called before
…………………………the program ends.
13. Which statement is true?
A. Calling Runtime.gc() will cause eligible objects to be garbage collected.
B. The garbage collector uses a mark and sweep algorithm.
C. If an object can be accessed from a live thread, it can't be garbage collected.
D. If object 1 refers to object 2, then object 2 can't be garbage collected.
14. If the depth of a tree is 3 levels, then what is the Size of the Tree?
A. 4 B. 2 C. 8 D. 6
15. If a lot of elements from a matrix have a value of 0 then the matrix is ?
A. Diagonal matrix B. sparse matrix C. Symmetric matrix D. Euclidian Matrix
16. The complexity of bubble sort in best case?
A. O(n) B. log 2 n C . O(n-1) D. O(n2)
17. Depth First search is based on ----------
A. Linked List B. FIFO C. STACK D. Queue
18. What is the value of the local variable x at the end of main?
int x = 5;
int main(int argc, char** argv)
{
int x = x;
return 0;
}
A. 0 B. 5 C. undefined D. compile Time Error
19. What is the value of y at the end of main?
const int x = 5;
int main(int argc, char** argv)
{ int x[x];
int y = sizeof(x) / sizeof(int);
return 0;
}
A . 0 B. 5 C. 20 D. undefined
20. Which of the following variables can be accessed in foo's function try block handler?
void foo(int x) try
{
int y = 2;
throw 1;
}
catch(int e)
{
}
int main(int argc, char** argv)
{
foo(3);
return 0;}
A. x and y and e B. x and e C. y and e D. e
21. Given the assumptions in the comments, what values is printed for x?
int main(int argc, char** argv)
{
// assume result printed is 4
std::cout << sizeof(int) << std::endl;
int x = 0x1000;
x = x << 32;
std::cout << std::hex << x << std::endl;
return 0;
}
A. 0x00000000 B. 0xFFFFFFFF C. implementation defined D. undefined
22. What value gets printed by the program?
#include <iostream>
int main(int argc, char** argv)
{
int x;
x = 1, 2, 3;
std::cout << x << std::endl;
return 0;
}
A . 1 B. 2 C. 3 D. undefined
23. Which of the following statements are true?
1) Conversion functions of class A convert from
class A into another type
2) Conversion functions of class A are used to
convert from another given type into class A
3) Converting constructors must be callable with
a single argument
A. 1 only B. 2 only C. 2 and 3 D. 1 and 3
24. What is the maximum number of implicitly defined constructors that this struct will have?
struct A
{
A(A& a) { }
A(double d) {}
int val; };
A. 0 B. 1 C. 2 D. undefined
25. If you have an array of characters allocated with new. Which of the following is the best way to
modify the size of the array?
A. Use the realloc function from libc
B. Delete the existing array, then allocate a new array and copy the data from the old array to the
……..new array
C. Allocate a new array, copy the data from old array to the new array and then delete the old array
D . It is not possible to do such an operation in C++


ANSWERS :


1.    b                  11.    c            21.  d
2 .   a                  12.     b          22.  a
3 .    c                  13.     c          23.  d
4.     b                 14.     c          24.  a
5.     b                 15.     b         25.  c
6.     d                 16.    d
7.      b                17.    c
8 .     a                18.    c
9 .     b                19.    b
10     a                20.    b



Monday, August 15, 2011

OPINION POLL

GUYS ur take on cognizance-1 !!!!!!! please give us ur opinion regarding events conducted on 12 th,13 th august so that these will help us in organizing things more efficiently in d next phase --

WARM Regards-
TEAM I.T.S.A

Saturday, August 13, 2011

Winners of COGNIZANCE-1


TEAM I.T.S.A
CONGRATULATESSSS!!!!!... 
all the winners of COGNIZANCE-1 ~~~~~~~~~~~~~~~ :-)


Debate - i TALK :
Winners: 


K.Meghana - 3/4 C3
Abhishek -1/4 c4


Runners:
Keerthana P.S.V.S-1/4 C3
Tahmina Q- 3/4 C2


Cricket Quiz: i kwiz
Winners:


R.Shivatheja-1/4 c4 
Maha Vishno-1/4 c4 

Runners:

Tanoy Majumdar-2/4 c1
Deepak Mishra-2/4 c1 


SIT - iNTEL iNSIDE:


Winners:

R.Ravindra Kumar-2/4 c1
K.Meghana-3/4 c3 
K.Chaitanya-3/4 c4 
Ankit-3/4 c3 


Runners:

Aditi Anand-2/4 c3 
M.Sowmya-3/4 c3 
Tanoy Majumdar-2/4 c2 
G.Karthik Venkata Manikanta-1/4 c3


PRODE: i KODE


Winners:


K.Chaitanya-3/4 c4
M.RaviTeja-2/4 c1


Runners:


K.Meghana-3/4 c3
Deepak Mishra-2/4 c1

Friday, August 12, 2011

ITSA GENERAL BODY DETAILS....

PRESIDENT --- SRINIVASA RAVITHEJA.A
VICE-PRESIDENT --- HARIKA.P

PANEL MEMBERS : 
VIVEK.K
PRATHYUSHA.N
SANDEEP.B
SWATHI.
RAMANA
SNEHA LAXMI
NIRANJAN.P.S.N
SRIDEVI.D

IMPORTANT NOTICE

ALL THE WINNERS PLEASE ASSEMBLE AT ROOM no :316 (ICT BHAVAN) THE GRAND FINALE IS GOING TO BEGIN AT 10 am :):):) please be there on time :):):)CONGRATULATIONS ALL :) 
ALL THE BEST :)

RESULTS OF COGNIZANCE-1(August,2011)


HELLO I.T.S.A members!!!!! CONGRATULATIONS
The following are the WINNERS of the preliminary round that was held on 12th August,2011:

PRODE--  iKODE : 
~~~~~~~~~~~~~~~~~~
 3rd year:

Annapurna –c3
P.Manohar-c4
K.Chaitanya-c4
R.Sureka-c4
K.Meghana-c3

2nd year:

Deepak mishra-c1
Tanoy majumdar-c1
M.Ravi teja-c1
Desuna pal-c1
P.Tejasree-c4

1st year:

S.Tanya
G.Pratyusha
D.Goutham
A.Varun Kumar
G.V.Vineesha


 SIT~~~ iNTEL iNSIDE :
~~~~~~~~~~~~~~~~~~~
 3rd year:

N.Thejaswini-c2
V.Amrit Raj -c1
B.Deepika-c1
P.V.Kruthi-c2
M.Soumya-c3
B.Nikitha-c1
P.Swetha-c4
K.Meghana-c3

2nd year:

Tanoy Majumdar-c2
M.Lokeshwar Reddy-c1
Ashish Behera-c2
Deepak Mishra-c1
Debrina Pal-c1
R.Ravindra Kumar-c1
Aditi Anand-c3
B.Rohit-c2

1st year:

K.Akilesh Varma-c3
G.Karthik Venkata Manikanta-c3
T.Abishek –c4
P.Lakshmi Yashwanth-c4
P.S.V.S.Keerthana-c3
Sangusha Ch-c4
Utsav Sinha-c4
A.Shashank Rahul—c3


Sports Quiz- i kwiz:
~~~~~~~~~~~~~~~
1st year:

K.M.Changappa-c4
Utsavsinha-c4
R.Shivtheja-c4
Maha Vishno-c4
K.S.S.Siddartha-c3
T.Sailesh-c3
N.Sandeep Varma-c3
K.akilesh Varma-c3

2nd year:

Tanoy Majumdar-c1
Deepak Mishra-c1

Group Discussion--- i TALK :
~~~~~~~~~~~~~~~~~~~~~~
3rd year:
 
Rohit -c5
Kanishka-c5
Pratik-c5
Chaitanya-c4
Shashank-c2
Tahmina-c2
Vaibhav.k-c4-
Tejaswini J.S.L
Priyanka Pandey-c1
Thejaswini.N-c2
Meghana-c3
Lalitha Smriti-c2
Nikhita.B-c1
Ankit.G -c3


2nd year:

Srikanth.V-c1
Tanoy Majumdar-c1
Aditi-c3
Vamsi krishna.G-c1

1st year:

Keerthana.P.S.V.S-c3
Alka Singh-c3
Akhilesh-c3
Rajendra Nayak-c4
Utsav Sinha-c4
Abhishek.R-c3
Dileep.V-c3
Bharathi.V.S-c5
Chandini.M-c5
Abhishek-c4
Vinod Kumar-c3
Aravind Gupta-c3