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 - Geometric

@ : Home > Placement Papers > Geometric > View Paper
GEOMETRIC Latest Placement Papers Pattern Part - 2
Rated : +3 , -0
Paper
Paper : GEOMETRIC Latest Placement     Papers Pattern Part - 2

SECTION 3 - C TEST
1. What is the mistake in the following program segment ?
f()
{
int a;
void c;
f2(&c,&a);}

2.
a=0;
b=(a=0)?2:3;
a) What will be the value of b and why ?
b) If in first statement a=0 is replaced by a = -1, b= ?
c) If in second statement a=0 is replaced by a = -1, b=?

3.
char *a[2];
int const *p;
int *const p;
struct new { int a;int b; *var[5] (struct new)}
Describe the statements in the above given construct ?

4.
f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
What is the value of c ?

5.
f1()
{
f(3);
}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;
}
What is the value of c?

6. What is the fallacy in the following program segment ?
int *f1()
{
int a=5;
return &a;
}
f()
int *b=f1()
int c=*b;
}

7. Give the C language equivalents of the following
a)Function returning an int pointer
b)Function pointer returning an int pointer
c)Function pointer returning an array of integers
d)Array of function pointer returning an array of integers

8. Find the fallacy in the following program segment?
int a;
short b;
b=a;

9. Define function ? Explain arguments in functions ?

10. How does C pass variables to a function ?

11. Explain the following program segment.
f(){
int *b;
*b=2;
}

12. Explain binary trees and their use ?

Like this?   +3   -0