# Geometric Limited Technical paper

Posted on :09-03-2016

Q1. What is the mistake in the following program segment ?

f()
{
int a;
void c;
f2(&c,&a);}

Q2.

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=?

Q3. Describe the statements in the above given construct ?

char *a[2];
int const *p;
int *const p;
struct new { int a;int b; *var[5] (struct new)}

Q4. What is the value of c ?

f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}

Q5. What is the value of c?

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;
}

Q6. What is the fallacy in the following program segment ?

int *f1()
{
int a=5;
return &a;
}
f()
int *b=f1()
int c=*b;
}

Q7. 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

Q8. Find the fallacy in the following program segment?

int a;
short b;
b=a;

Q9. Define function ? Explain arguments in functions ?

Q10. How does C pass variables to a function ?

Q11. Explain the following program segment.

f(){
int *b;
*b=2;
}

Q12. Explain binary trees and their use ?

Q13. Draw the diagram showing the function stack, illustrating the variables that were pushed on the stack at the point when function f2 has been introduced.

type def struct
{ double x,double y} point; }
main( int argc, char *arg[3])
{ double a;
int b,c;
f1(a,b); }

f1(double x, int y)
{point p;
stack int n;
f2(p,x,y)
}

f2(point p, double angle)
{ int i,j,k,int max;

FreshersLive - No.1 Job site in India. Here you can find latest 2020 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

 ✖