Subex Placement Papers

Company Overview : Subex Systems offers a range of solutions covering a host of BSS functions across the spectrum of fulfillment, revenue maximization and data integrity operations. From best-in-class solutions that can be easily integrated into your existing processes to complete, integrated suites that capture the best practices in efficient service delivery, margin enhancement, and cost reduction, Subex provides breakthrough technology with unparalleled domain expertise to enabling operations to reach their maximum potential.

Subex Azure Selection Pattern : The selection is based on written/aptitude test, technical interviews and HR round. 
The written test is divided into 2 sections. The first section is objective test in which there are 20 questions for which 30 minutes are allotted. For every wrong answer 1/2 mark will be deducted. The section section is Programming section in which there are 2 questions and you have to attempt only one. The time allotted for this is 30 minutes.

Placement Paper : 

Some of the Technical Questions : 

1. What will be the output of the following program?

Note: Space is represented by 0.

int main(int argc,char *argv[])

{char *s=“Hello,world”;printf(“%10s”,s);}

a) Hello,world0000000000 b) Hello,worl c) 0000000000Hello,world d) Hello,world

ans: d

2. In the below program the getNewString function is defined and it returns a character pointer. This function is called from main function as defined below. What will be the output of this program?

char *getNewString( )

{static char xxx[1024];return xxx;}

main( )

{char g[]=“First”;char *p;strcpy(getNewString( ),g);

p=getNewString( );

strcpy(p,“Second”); 

printf(“The string is : %s”,getNewString( ));}

a) The string is : First b) The string is : FirstSecond c) The string is

ans: c 

: Second

d) Unknown, since the scope of the pointer is local 



3. What will be output of the following recursive program?

void printme(int *p)

{int q=*p;if(*p>0)

{q=*(p);printme(p);}printf(“%d”,q);}void main(void)

{int x[5]={0,16,12,8,1};

printme(&x[4]);}

a) 0,0,1,2,3, b)4,8,12,16,0, c) Error cannot pass elemenpointer

b) 0,16,12,8,4



4. What is the output of the following line in 32-bit OS?

printf(“%d%dn”,sizeof(‘a’),sizeof(“a”));

a) 4,2 b) 1,1 c) 1,2 d)2,2



5. What is the output of following program?

#include

#include

main( )

{char str[]=“Welcome to Subex Systems”;

char *ptr;

ptr=strtok(str,“ ”);

while(ptr) ptr=strtok(NULL,“ ”);

printf(“%sn”,str);}



a) Welcome to Subex Systems b) Error, since NULL is passed to strtok

c)NULL d) Welcome 



6. Study the program below and predict the output

#include

int compute(int (*)(int),int);

int cube(int);

main( )

{printf(“%dn”,compute(cube,4));}

/* no syntax errors please…have fun!!*/

int compute(int(*f),int in)

{int res=0,i;for(i=1;i<=in;i++);res+=(*f)(i);return(res);}

int cube(int n)

{return (n*n*n);}

a) 150 b) 64 c) 125 d)225



7. The output of the following program is

#include

main( )

{int i=-1;while(i<5)

{#ifdef _X_printf(“%d”,i++);#endif}




void main()
{
enum bool{true,false};
if(true==(2==3)
printf(“..
else
printf(“..
}

void main() 
{
printf(“%d”,(float)3/2);

void main() 
{
int (*func)(const *char)=strlen; 
printf(“%d”, func(“Hello”); 

void main() {
char *s=”Hello World”;
printf(“%c”,s);

File fp,fs;
fp=fopen(“tc.dat”,”w”);
fs=fopen(“tc.dat”,”w”);
putch(‘A’,fp);
putch(‘B’,fs); What will happen? 

What is the equivalent of a Ans: *(a+i)

int (*func)(int,int) is a pointer to a function with 2 integers as parameters and returning an integer value.

int *(*func)(int *,int *) is a pointer to a function with 2 integer pointers as parameters and returning a pointer to

an integer Which of a and b is true?
Ans: Both are true.

switch(float value) this is compiler error.

int a[5]={1,2,3,4,5};
int *p=a+1;
int *q=a+5;

int dif=q-p;
value of dif is 4 ( q-p is evalueated as q-p/sizeof int)

Switch(NULL)
ans: case 0: will be executed.

#define exp 5
printf(“%d”,exp++);
ans: compilation error lvalue required

strcat(str,str);
ans: compilation error

Pointers can be subtracted from each other, can be added, constant cab be added or subtrated from pointer, but multipilcation with constant to pointer is not possible.

int(*ptr)[10] pointer to array of 10 integers.








a) Compiler error b) -1,0,1,2,3,4, c) Infinite loop d) 1,2,3,4,

8. The output of the following program is

#include

void f(char* p);

main( ) 

{char *p=(char*)l;f(p);printf(“%sn”,p);}

void f(char *p)

{char sz[]=”hello”;p=sz;

a) Runtime error b) NULL c)hello d) Compiler error



9. The output of the following program is

#includestdio.h>

void f(char **p)

{char *sz=“hello”;*p=sz;}

main( )

{char *p=“NULL”;f(&p);printf(“%sn”,p);}

a) Compiler error b) Runtime error c) hello d) 1

10. The output of the following program is

#include

main( )

{int n;if(n<=-1)

{int x=1else

{

int x=1;

}a) Compiler error b) Unpredictable output c) 10 d) 1



11. The correct declaration of a pointer “func” to function returning a “char” and taking no parameters is

a) char func( )* func;

b) char (*func)( );

c) char* ( ) func;

d) None of the above 



12. The output of the following program is

#include

#define arbit 5

main( )

{printf(“%dn”,arbit}

a) 5 b) 6 c) Compiler error d) Runtime error



13. Determine which of the following are valid identifiers

i. Return

ii.123 45 6789

iii. Record_1

iv. $Tax

a) iii & iv b) i & iii c) i,ii & iv d) i & iv



14. The output of the following program is

#include

struct x {int a; char *b;} *p;

main( )

p=(struct x*) 100;

printf(‘%d,%d,%dn”,p,p+1,&p[2]);

a) 100,108,116 b) Compilation error c) 100,104,108 d) 100,103,106


15. What is the output of the following?

main( )

int a[5]={5,1,15,20,25};

int i=1; 

printf(“n%d%d”,a++,a[++i]);

a) 2,16 b) 1,15 c) 1,20 d) 2,1

16. What is the output of the following

main( )



int a[5]={5,1,15,20,25};

int i=1;

printf(“n%d%d”,a,a[i++i]); 

a) 2,16 b) 1,15 c) 1,20 d) 2,16

16. static float table [2][3]={{1,1,1,2,1,3},{2,1,2,2,2,3}};

What is the value of *(*(table)+1)+1?

a) 2,2 b)1,2 c) 2,1 d) 2,3



17. What is the output of the following program?

#include

main( )

int i,j,x=0;

for(i=0;i<5;++i)



for(j=0;j

x+=(i+j-1);

printf(“%d”,x);

break;

a) 1 b) 0 c) 2 d) None of the above

18. Consider the following

i. Pointer to a function that accepts 3 integer arguments and returns a floating-point quantity

float(8pf)(int a, int b,int c)

ii. Pointer to a function that accepts 3 pointers to integer quantities as arguments an returns a pointer to a floating-point quantity

float *(*pf)(int *a,int *b,int *c);

a) i is true, ii is true b) i is true,ii is false

c) i is false, ii is false d) i is false, ii is true

19. Consider the following statements

i. An integer quantity can be added to or subtracted from a pointer variables.

ii. Two pointer variables can be added.
iii. A pointer variable can be multiplied by a constant

iv. Two pointer variables of same type can be subtracted.

a) Only ii & iv are true b) Only iii is false c) Only ii is false d) Only i & ii are true

20. If p is a pointer ,what does p mean?

a) Same as *(*p+i)

b) Same as *(p+i)

c) Same as *p+i

d) None of the above



Coding Questions :


1) write a program to convert a expression in polish notation (postfix) to inline (normal) something like make 723+*  (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form  to infix.

2)Write a program to print distinct words in an input along with their count in input in decreasing order of their count.
**other sets**

3)There is a mobile keypad with numbers 0-9 and  alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.

All The Best Guys!!


Leave a Reply

Your email address will not be published. Required fields are marked *