Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing

# Placement Papers - Sasken

@ : Home > Placement Papers > Sasken > View Paper
SASKEN PAPER - 23 AUG 2003
Rated : +0 , -0
Hi Friends,

I has written Sasken Exam on 23rd August at 3:00 P.M.
I am sending these papers.

They has conducted Two tests.One test is C 10 Q for 10 Marks and Other one is in thier corresponding B.Tech Subjects 15 Q for 15 Marks.For CSE Students the subjects are Automata Theory Formal Languages,Data stcures,Discrete Mathematics, Operating System,Digital Logic Design,Computer Organisation,
Micro Processer and Computer Networks.

C Test------10 Q-10 M
Electives---15 Q-15 M
Duration of these two exams is 1Hr.
C Test
------
1.
What is the output of the Program?

main()
{
int a[10]={1,2,3,4,5,6,7,8,9,10};
int *p=a;
int *q=&a[9];
printf("%d",q-p+1);
}
Ans: 10
2.
main()
{
int i=6;
int *p=&i;
free(p);
printf("%d",i);
}
Options:
a. No Error.
b. Free can't be used for p,
c. Compiler Error.
d. In printf we should use *p instead of i.

Ans: A
3.
What is the output of the Program?

main()
{
int i=5;
i=!i>3;
printf("%d",i);
}
Ans: 0

4.
What is the output of the Program?

main()
{
int a[10];
3[a]=10;
printf("%d",*(a+3));
}
Ans: 10
5.
int (*p[10]) ();

In above declaration what type of variable  is P?
Ans: P is array of pointers that each points to
a function that takes no arguments and returns
an int.
6.
What is the output of the Program?
struct emp
{
int a=25;
char b[20]="tgk";
};
main
{
emp e;
e.a=2;
strcpy(e.b,"tellapalli");
printf("%d %s",e.a,e.b);
}
Ans: Compile Error.
7.
What is the output of the Program?
main()
{
int a=5;
const int *p=&a;
*p=200;
printf("%d",*p);
}

Ans: Compile Error.
8.
What is the output of the Program?
#define SQ(x) x*x
main()
{
int a=SQ(2+1);
printf("%d",a);
}

Ans: 5.
9.
What is the output of the Program?

main()
{
struct t
{
int i;
} a,*p=&a;
p->i=10;
printf("%d",(*p).i);
}

Ans: 10
10.
This program will be Compiled? [Yes/No]
zzz.c file
----------
/* This is zzz.c file*/
/*printf("tellapalli");*/
abc.c file
----------
main()
{
#include"zzz.c"
printf("Tellapalli");
}
Ans: Yes

CSEA01 Test
-----------
I haven't remembered the Qs.I has forgotten Qs.
They has given 5Q in OS,3Q in DM,2Q in ATFL,1Q in DLD,
1Q in CO,1Q in MP 1Q in DS,1Q in CN.

While(Fresher)
printf("ALL THE BEST");

Like this?   +0   -0