Recent questions tagged programming

1 votes
2 answers
813
Consider the following program:# define Rec(a) a + a * aint a;a = 20 + Rec(a) * Rec(a + 1);printf(“%d”, a)return 0;}The output of above program for a = 3 is ________....
0 votes
1 answer
815
Ans is given as (D). But I am not getting it. If we consider HEX format, then it is giving me (A) and in normal format it is giving 2240. Where's the problem??
1 votes
1 answer
817
1 votes
1 answer
818
2 votes
2 answers
819
2 votes
2 answers
821
x– = y+1; does the same as:(a) x= x –y +1 (b) x= – x –y – 1(c) x= –x + y +1 (d) x= x – y – 1is ans is a ?given d
1 votes
2 answers
822
#include &#8236;<stdio.h int main(){ int i = 4; i = printf(" %d ", ++i) + printf(" %d ", i ); printf(" %d ", i); }
2 votes
1 answer
823
P(X:integer,Y:integer) { X = 6; A = 8; return ( X + Y ) }if the function P were invoked by the following program fragment. k = 1; L = 1; Z = (K, L);Then the value of Z wo...
5 votes
5 answers
824
______ is the number of moves of the smallest disc in Tower of Hanoi implementation where the tower consisting of 17 discs (numbered from 0 to 16)Answer given: $2^{16}$ ...
7 votes
5 answers
830
Consider the following program fragment if(a b) if(b c) s1; else s2;s2 will be executed ifa <= bb cb >= c and a <= ba b and b <= c
0 votes
2 answers
836
#define int charmain(){int i=66;printf("%d",sizeof(i));}
3 votes
2 answers
838
Which of the following is true with respect to Reference?A reference can never be NULLA reference needs an explicit dereferencing mechanismA reference can be reassigned a...
2 votes
3 answers
839
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?Values of local variablesReturn addressHeap are...
2 votes
3 answers
840
The minimum number of temporary variables needed to swap the contents of two variables is:(a) 1     (b) 2(c) 3     (d) 0