TI Question Paper - II
Posted by Subash | 8:43 AM
[0] Comments
Digital
simplyfy k map
1 x x 0
1 x 0 1
Implementation of priority queue
a. tree
b linked list
c doubly linked list.max and avg. height of sorted binary tree.
size of integer is
a. 2 bytes
b 4 bytes
c. machine dependant
d compiler dependent.- Questions On Pointer to Function
main()
{
int i,*j;
i=5;
j=&i;
printf("\ni= %d",i);
f(j);
printf("\n i= %d",i);
}
void f(int*j)
{
int k=10;
j= &k;
}
output is
a 5 10
b 10 5
c 5 5int f(int a)
{
a=+b;
//some stuff
}
main()
{
x=fn(a);
y=&fn; }
what are x & y types
a) x is int y is pointer to afunction which takes integer valuemain()
{
char a[10]="hello";
strcpy(a,'\0');
printf("%s",a);
}
output of the program?
a) string is null b) string is not null c) program error d)void f(int *p){
static val=100;
val=&p;
}
main(){
int a=10;
printf("%d ",a);
f(&a);
printf("%d ",a);
}
what will be out put?
a)10,10void f(int value){
for (i=0;i<16;i++){>>1) printf("1")
else printf("0");
}
}
what is printed?
a) bineray value of argument b)bcd value c) hex value d) octal valuefor hashing which is best on terms of buckets
a)100 b)50 c)21 d)32 ans 32size of(int)
a) always 2 bytes
b) depends on compiler that is being used
c) always 32 bits
d) can't tellstruct a
{
int a;
char b;
int c;
}
union b
{
char a;
int b;
int c;
};
which is correct .
a. size of a is always diff. form size of b.(ans.)
b. size of a is always same form size of b.
c. we can't say anything because of not-homogeneous (not in ordered)
d. size of a can be same if ...x=x^y;
y=x^y;
x=x^y;
x=?In a link list we want to go from last to first element and vice
versa.
Which is efficient
a. Cirular List
b. Doubly Link List
c. Double Ended Link List
d. Simple ListHash function h(i)=i mod 5, there are 5 buckets 0,1,2,3,4. Rehashing is
(h(i)+1)mod 5,(h(i)+2)mod 5......
5 numbers are to be enterd, Find the number in a given bucket..To reconstuct a Tree which sequence is enough
a. Inoreder sequence
b. Preorder and Post order
c. In, Pre, Post order are required
d. Any one can be used(i)
for(i=0;iconvert a inorder string to post order
int (*a[5])() what is this declaration?