Programming :
1. Write a program to allocate 2-D memory.
Ans:
Allocating 2D memory can be taken as two dimensional array , where row can be allocated first then column using double pointer.
int **p;
p = malloc( rows * sizeof(int*));
for(int i = 0; i
*(p+i) = malloc(column * sizeof(int));
}
One can also assign some character pattern to this two dimensional memory.
2. Write a program to draw circle with 1 at circumference in a NxN matrix = {0}.
Ans:
1. Divide the entire Matrix in four equal part.
2. In first quadrant , Arc can be drawn and replicate for other 3 quadrant.
3. To draw an Arc by 1 over the 1st Quad Matrix of N/2 x N/2, Assign the value 1 to all the point which should lie on circumference of the circle.
4. Centre of Circle = {N/2,N/2}
5. Radius = {N/2}
6. In 1st quad starting from first row i.e. x = 0 , the y co-ordinates to lie on circle circumference should come as per formula Sqr(x-a) + Sqr(y-b) = Sqr(radius)
so y would be Sqroot{|Sqr(N/2) - Sqr (|x - N/2|)|} for x vary from 0 to N/2 to form an Arc.
7. Assign the array value to 1 for obtained (x,y).
3. Write a program to implement itoa().
4. Write a multi-threaded parallel program to solve the equation :
10a + 10b + 10c + 10d.
Assuming there are four cores.
5. What is the O/P of
a) int main() {
printf("%x", main());
return 0;
}
b) int main() {
int a = 11;
char *str = "nvidia";
char arr[10] = "talk";
strcpy(str, arr);
}
c) if(malloc(0) != NULL) {
printf("good");
} else {
printf("bad");
}
d) int a = -20;
unsigned int b = 6;
if(a>b)
printf("unsigned");
else
printf("signed");
e) int main() {
fork();
fork();
fork();
printf("hello fork");
}
and Explain.
6. Explain the high level flow of Android Video playback.
7. What do you mean by Data tunneling.
8. What are the different System Signals
SIGABRT - Abnormal termination
SIGFPE - erroneous Arithmetic operation
SIGILL - illegal instruction.
SIGINT - interactive attention signal
SIGSEV - An invalid access to storage
SIGTERM - termination request etc
can refer
10. Explain RTSP streaming.
11. Explain state transition of OMX Component.
12. Explain the AV Sync logic.
13. Try to explain the high level logic of Audio recording.
14. find out the average of two number efficiently
a>>1 + b>>1
15. Lets say input is N = 1000 0000 0000 0000 and M = 10101
copy M into N from position i = 2 to j = 6th of N.
O/P should be N = 1000 0000 0101 0100
16. Lets say there is an integer a , extract the position of different value c from the set (0,1,2,3)
as bits in a and save the position value in b. Write a macro for this
c = Extract_bit(a,b);
#define Extract_bit(a,b) .................................
17. What are the video artifacts have you observed. Can you explain the reason behind them.
18. What are the Green frames. What does it signifies. Why is it green by the way?
19. What does the Grey frames indicate.
20. Write a program to calculate the amount of loan repayment year , where you have taken loan of amount P with rate r% annual. You do payment of amount A every year.
puzzles:
1. In a Cricket Match , there are two balls remained , and last pair is on the pitch with seven runs remained to win. In what there will be win for batting team.
2. There is long number having total digit count to be 1996 like
abcdef ........1996 each two digit pair in the number is either divisible by 17 or 23.
find out the last digit of this number.
3. Number of zeroes in 100!
No comments:
Post a Comment