SUBEX Placement-Paper

I am lucky to clear first round which consisted of objective C questions here are some examples for it.
I must say subex has class questions in C and also test your in-depth knowledge of C. Prepare well and you are bound to clear.
Focus on concepts more than just questions here in papers. These will give you idea of questions but not full ability to solve. 🙂
I thanks all to who posted questions here and helped
me. So here is my share to this.
****************Objective Test****************
negative marking was 0.25 for each wrong answer.
Apart From the other questions i found on these forums
other questions which were not listed are.
Find the O/p of the following
1)
#include
int main()
{
char c=’1′;
int j=atoi(c);
}

2)
int main()
{
const int j=2;
int i;
switch(i)
{
case 1:break;
case j:break;
default:break;
}
}

3)
#define VOLEDEMORT _who_must_not_be_named
int main()
{
printf(“VOLEDEMORT”);
}

4)
struct node
{
char *name;
int num;
};
int main()
{
struct node s1={“Harry”,1331};
struct node s2=s1;
if(s1==s2)
printf(“Same”);
else
printf(“Diff”);
}
5)
int main()
{
char s1[]=”Hello”;
char s2[]=”Hello”;
if(s1==s2)
printf(“Same”);
else
printf(“Diff”);
}
6)
int main()
{
int j=5;
printf(“%d”,(*&j)++);
}
7)
int main()
{
int x=0x5678;
int y=0x1234;
x=x|y;
y=y&0x1234;
printf(“%x”,y);
}

8)
struct struc
{
int a:1;
int b:3;
int c:6;
int d:3;
}s1;
struct stru
{
char a:3;
}s2;
int main()
{
printf(“%d %d”,sizeof(s1),sizeof(s2));
getchar();
}
9)
void fun(int const *ptr)
{
*((int *)ptr)=20;
}
int main()
{
int const j=10;
fun(&j);
printf(“%d”,j);
getchar();
}
10)
int main()
{
char s1[]=”Hello”;
char s2[]=”World”;
printf(“%s”,strcpy(s1,s2));
getchar();
}

11)
int main()
{
static int i=5;
if(–i)
main();
printf(“%d”,i);

getchar();
}
Something similar which actually prints 54321
12)
struct node
{
int a;
struct node n1;
};
int main()
{
struct node s1;
printf(“%d”,s1.a);
}
13)
int main()
{
int mat[5][5];
int i,j,*p;
p=mat;

for(i=0;i<5;i++)
for(j=0;j<5;j++)
mat[i][j]=i+j;
printf(“%d”,sizeof(mat));
i=4;j=5;
printf(” %d”,*(p+i+j));
getchar();
}
Then we have to write programs
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.
Best of luck to all.. just stay focused and you are
bound to clear. 🙂

Leave a Comment

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

Scroll to Top