sincerely.
They were cool. U need not get tensed. They won't attack you. Just they want to
know ur hold about the subject.
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.
|
|