Recent questions in Programming and DS

1 votes
1 answer
5182
1 votes
2 answers
5184
1 votes
1 answer
5185
16 votes
3 answers
5186
A is an array $[2.....6, 2.....8, 2.......10]$ of elements. The starting location is $500$. The location of an element $A(5, 5, 5)$ using column major order is __________...
1 votes
0 answers
5187
1 votes
1 answer
5189
certain file system stores records as per binary search tree principles.If the preorder traversal is 90,40,30,190,140,100,290.What is the expected number of comparisons w...
1 votes
3 answers
5190
how it is compiler errorint main(){extern int i;printf("%d ", i);{int i = 10;printf("%d ", i);}}(a) 0 10 (b) Compiler Error(c) 0 0 (d) 10 10ans b
1 votes
2 answers
5191
as i is initialized with 5 in main then how it becomes 0 please explain ?int main(){static int i=5;if( i){main();printf("%d ",i);}}op = 0000
1 votes
1 answer
5193
what function fun() does here#include <string.h>#include <stdio.h>#include <stdlib.h>void fun(char str_ref){str_ref++;}int main(){char *str = (void *)malloc(100*sizeof(c...
2 votes
1 answer
5194
Explain the array representation used here#include <stdio.h>int main(){int a[][3] = {1, 2, 3, 4, 5, 6};int (*ptr)[3] = a;printf("%d %d ", (*ptr) , (*ptr) );++ptr;printf("...
1 votes
1 answer
5195
What it means ?int (*p)[R][C];
4 votes
2 answers
5197
Explain the line :t = (p += sizeof(int))[-1];in following program :#include <stdio.h void f(char ); int main() { char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(...
2 votes
1 answer
5198
What is time complexity to evaluate prefix and postfix expression ? as per me it should be O(n) as atmost 2 pop operation perform and 1 push operation
2 votes
2 answers
5199
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
0 answers
5200
Explain how to evaluate ithow to evaluate recursion within loopConsider the following C function:int fun (int n){int x=1, k;if (n= =1) return x;for (k=1; k < n; ++k)x = x...