Most viewed questions in Programming and DS

1 votes
1 answer
4921
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
–1 votes
1 answer
4922
0 votes
2 answers
4923
the run time for traversing all the nodes of a binary search tree with n nodes and printing them in an order is1. o (n log n)2. o (n)3. o(sqrt(n))4. o (log n)
2 votes
1 answer
4924
#include<stdio.h int main() { int i, j, k; i = 5; j = ++i; i = j ; k = (i+j)++; printf("%d",k); }What will be the output of the above program?(A) 11(B) 12(C) Compilation ...
1 votes
2 answers
4925
If the maximum height of a binary tree is $\mathrm{N},$ then how many number of nodes will there be?
0 votes
0 answers
4926
#include <stdio.h>int cou=0;int cal(int a,int b){ int c; cou++; if(b==3) return(a*a*a); else{ c=cal(a,b/3); return(c*c*c); }}int ma...
0 votes
0 answers
4927
0 votes
1 answer
4929
Do C supports Call by reference parameter passing technique ?
0 votes
1 answer
4930
What will be the output of the following program assuming that parameter passing iscall by valueprocedure P{a, b, c}; begin a:=b:=3; b:b+1; c: a+a end; begin main P(a+b, ...
0 votes
0 answers
4931
#include<stdio.h>int r(){ static int num=9;return num ;}int main() { for(r();r();r()) {printf("%d%d",r(),r());};return 0;}Why is the output 6723 and not 7632?
0 votes
0 answers
4932
What is the time taken to delete min element from max heap with and without using heapify?
0 votes
1 answer
4933
Consider a stack is used to evaluate fully parenthesized arithmetic expression from left to right. Each opperand is placed on the stack and operators operate on top two e...
0 votes
1 answer
4934
1 votes
0 answers
4935
#include<stdio.h>int main(){ int i =6; for(int i=0;i<5;i++){ printf("%d",i);}} This code when run using C compiler gave exception redefinition of i .But with Cplus plu...
2 votes
0 answers
4936
How can we print these alphabets using simple c program? ABCCDEFDEFGHIJEFGHIJKLMNO
0 votes
1 answer
4937
what is the difference between a null pointer , a NULL macro ,the ASCII NUL Character and null string?
2 votes
1 answer
4938
1 votes
1 answer
4940
The data structures most suitable to do an inorder and level order traversals of a binary tree respectively areStack and QueueQueue and StackStack and StackQueue and Queu...