3 votes
1
1 votes
4
int i = 1; int main() { int a[]= { 0,1, 2} ; f(a[i], i); printf("%d", a[i]); } void f(int x, int y) { y++; x=5*i; }In above function f() uses " call by name" technique, w...
0 votes
5
void main() { int x=10, y=5; swap(x,y); print(x,y); } void swap(int a, int b) { int c, x=0; c=a; a=b; b=c; }what is output using call by text?a) 5 0b) 5 10c) 10 0d) ...
1 votes
6
Consider the following C code:char A[20]; A="gate";Which of the following is correct?a) '\0' is automatically appended at the end of "gate".b) '\0' is not stored at the e...
0 votes
7
int foo(unsigned int n) { int c,x=0; while(n!=0) { if(n&01) x++; n>>=1; } return c; }
9 votes
12
Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2.$$\begin{array}{|ll|ll|}\hline \rlap{\textbf{Group 1}} & & \rlap{...
45 votes
13
Faster access to non-local variables is achieved using an array of pointers to activation records called a stackheapdisplayactivation tree
0 votes
16
Let $x$ be an integer which can take a value of $0$ or $1$. The statementif (x == 0) x = 1; else x = 0;is equivalent to which one of the following ?$x = 1 + x;$$x = 1 - ...
39 votes
19
Consider the following C function:int f(int n) { static int i = 1; if(n >= 5) return n; n = n+i; i++; return f(n); }The value returned by $f(1)$ is:$5$$6$$7$$8$
0 votes
20
What's the "condition" so that the following code snippet prints both HelloWorld ! if "condition" printf ("Hello"); else printf ("World");