Get in here to get the Interview Tips of Various Companies. Or see how to improve performances related to your job.

Test Paper :5
Paper Type : Whole Testpaper
Test Date : 1 February 2005
Posted By : Mrudul

SUBEX Placement Question Paper 2 2005

Written test:one hour
There are 2 parts.
Part 1 : 20 C Qs (corect=+1, wrong= -1)
Part 2 : 2 Programming problems, out of which you need to answer 1(have to write C
code)

Here are samples
1.
#include <stdio>
int main()
{
char *str = "Hello, world" ;
printf("%5s" , str);
}
Output :

2.
int *ptr[10];
what is the above?
a) declaration of 10 pointers
b) declaration and defn of 10 pointers
c) declaration and defn of an array of 10 pointers
d) none

3.
#include <stdio>
int main()
{
extern int i;
printf("%d" , i);
}
a) garbage
b) 0
c) compiler error
d) linker error

4.
#include <stdio>
void temp();
void temp(void);
int main()
{
temp();
}
void temp()
{
printf("C is exciting!");
}
Output :

5.
#include <stdio>
void temp(int i)
{
if(i == 10) return;
i++ ;
temp(i);
printf("%d" , i);
}
int main()
{
temp(1);
}
Output :

6.
int func (int (*)(int) , int);
int cube(int n)
{
return (n*n*n);
}
int main()
{
prinf("%d" , func(cube , 4));
}
int func(int (*tmp)(int in) , int n)
{
int res , i;
for(i = 1 ; i <= n ; i++)
res += *(tmp)(i);
return res;
}
Output :

7.
Some question on "strtok" function

8.
#include <stdio>
int main()
{
char *str = "Hello, world";
int i = sizeof(str);
for( ; i >= 0 ; i--)
printf("%c" , str[i]);
}

9.
Some question on recursion

10.
#define MAX(A , B) ( A < B ? B : A )
#include <stdio>
int main()
{
int a = MAX( 4+2 , 3*2) ;
printf(" %d " , a);
}

11.
Question involving sizes of structure and unions


Part 2 :
1) program that recognizes date of any format
even formats like "feb-2-2003" , "02-february-2003" , mm/dd/yy ,
dd/mm/yy, etc and display it as mm/dd/yy

2) a text filename is given as a command line argument followed by a
character as the
next argument. store all sentences NOT beginning with that
character(ignore case)
in a seperate file.
NOTE THAT ITS SETENCES YOU'VE TO CONSIDER AND NOT LINES!!!!


INTERVIEW


There will be 3 rounds interviews,2 tech and 1 hr

1st round


1) full c and c++;
2)something about project.
(6 sem dbms and main);
3)prog on linked list (reverse of singly link list)
ie. u have contents like (eg:xebus) in l list how will u print
it as subex
ans(using stack or recursion);
4)printf and scanf return values
5)v.functs
6)const funct(why)
7)why static is defined outside the class


2nd round


1)single link list prog (using c++ insert front inser rear ins
at position delete at position)
base class contains 2 functs
derived class 2 functions
3)osi model; tcp/ip model
4)vertual memory concepts;
5)buble sort ,insert sort(with time complexity);
6)ipc s in unix;


3rd round


It is taken by COO of Subex and will be Tech cum HR.
They also try to give u some stress so be prepared.
ADVERTISEMENT