1) A - G are 7 consecutive +ve integers not necessarily in the same order
1) B is the middle number
2) D is 3 less than c
3) the difference between F & A is equal in magnitude and sign
to the difference between E & C
4) Neither F nor C lie between E & G
a) What is the value of B-F
1 2 -1 -2 cannot be determined
b) which is greatest
F C A E cannot be determined
c) Given both A & B are primes what is the lowest value of E
8 6 9 12 cannot
2) Given that a,b,c,d,e each represent one of the digits between
1-9 and that the following multiplication holds
a b c d e
4
----------
e d c b a
What digit does e represent
a) 4
b) 6
c) 7
d) 8
e) none
1. How many butes does an array A(1:8,-2:2,1:5) require for storage if
each element of the array is 24 bits long.
200 480 600 800 none
2. begin
i:=0;
j:=0; | block d
loop:
if(i != 0)
i := i-1;
else
i := i+1;
i := i+1; | block a
j := j+1; | block b
if (j <= 25) goto loop; end | block c a) What is the value of i at [c] 2 ? b) How many times is the goto executed 25 ? c) How many times is the loop executed if i is initialized to 1 in [d] 26 d) How many times is the loop entered if the block [b] is changed to j=j+1 ? e) What is the value of i at [c] interchanging blocks [a] and [b] ? 2 ? Follow the instructions given below [ From 1 to 8 ] 1. A cause B or C but not both 2. F occurs only if B occurs 3. D occurs if B or C occurs 4. E occurs if only c occurs 5. J occurs only if E or F occurs 6. H occurs if E occurs 7. D causes G, H or Both. 8. G occurs if F occurs. Questions 1. If A occurs which of the following may occur 1. F & G (ii) E & H (iii) D Ans (a) 1 only (b) 2 only (c) 3 only (d) 1,2,3 or 2 & 3 but not 1 (e) 1,2 & 3 2. If B occurs which must occur Ans (a) F & G (b) D & G (c) D (d) G & H (e) J 3. If J occurs which must occur Ans (a) E (b) Both E & F (c) Either B or C (d) B (e) Both B & c 4. Which may occur as a result by a cause not mentioned. (I) D (II) A (III) F Ans (a) I only (b) II (c) I & II (d) II & III (e) I,II,III 5. If E occurs which cannot occur. (a) F (b) A (c) D (d) C (e) J #include
int SumElement(int *,int);
void main(void)
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
printf("%d",SumElement(x,10));
int SumElement(int array[],int size)
int i=0;
float sum=0;
for(;i
void main(void);
int printf(const char*,...);
void main(void)
{
int i=100,j=10,k=20;
-- int sum;
float ave;
char myformat[]="ave=%.2f";
sum=i+j+k;
ave=sum/3.0;
printf(myformat,ave);
#include
void main(void);
void main(void)
int a[10];
printf("%d",((a+9) + (a+1)));
#include
void main(void);
void main(void)
struct s{
int x;
float y;
}s1={25,45.00};
union u{
int x;
float y;
} u1;
u1=(union u)s1;
printf("%d and %f", u1.x,u1.y);
#include
void main(void)
unsigned int c;
unsigned x=0x3;
scanf("%u",&c);
switch(c&x)
case 3: printf("Hello!\t");
case 2: printf("Welcome\t");
case 1: printf("To All\t");
default:printf("\n");
#include
int fn(void);
My Quote