Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Recent questions in Programming and DS
0
votes
0
answers
2381
C programming
garg div
292
views
garg div
asked
Dec 20, 2017
0
votes
0
answers
2382
huffman coding
Assume that letters p, q, r, s, t and q have probabilities 1/2, 1/4, 1/8, 1/16, 1/32 and 1/32 respectively. The difference in the average length of the message without and with using Huffman’s coding is ______ . (upto 2 decimal places)
Assume that letters p, q, r, s, t and q have probabilities 1/2, 1/4, 1/8, 1/16, 1/32 and 1/32 respectively. The difference in the average length of the message without an...
mohitbawankar
692
views
mohitbawankar
asked
Dec 20, 2017
0
votes
0
answers
2383
C Prog
#include<stdio.h> int reverse(int); int main() { int num=4; reverse(num); return 0; } int reverse(num) { if(num==0) return 0; else printf("%d",num); reverse(num--); } What is the output ?
#include<stdio.h int reverse(int); int main() { int num=4; reverse(num); return 0; } int reverse(num) { if(num==0) return 0; else printf("%d",num); reverse(num ); }What i...
junaid ahmad
919
views
junaid ahmad
asked
Dec 20, 2017
Programming in C
programming-in-c
output
+
–
1
votes
2
answers
2384
C PROGRAMMING
Assuming no syntax error:
Assuming no syntax error:
mohitbawankar
1.3k
views
mohitbawankar
asked
Dec 20, 2017
Programming in C
programming
+
–
0
votes
1
answer
2385
general C programming doubt
How to work on such question ? Answer is : 19 #include <stdio.h> int main() { int i = 4, ans; ans = ++i + ++i + ++i; printf("%d\n", ans); return 0; }
How to work on such question ? Answer is : 19#include <stdio.h>int main() { int i = 4, ans; ans = ++i + ++i + ++i; printf("%d\n", ans); return 0;}
Anmol_Binani
432
views
Anmol_Binani
asked
Dec 19, 2017
0
votes
0
answers
2386
data structure
The number of permutations can be obtained in the output using stack assuming that input contains elements 1, 2, 3, 4, 5, 6 in any order such that 3 will poped out from stack at 3rd position are _______ (assume one element enter in stack only one time)
The number of permutations can be obtained in the output using stack assuming that input contains elements 1, 2, 3, 4, 5, 6 in any order such that 3 will poped out from s...
pawan kumarln
315
views
pawan kumarln
asked
Dec 19, 2017
Programming in C
data-structures
stack
+
–
0
votes
0
answers
2387
C Programming
#include<stdio.h> int main() { int a[2][2][2]={10,2,3,4,5,6,7,8}; int *p,*q; p=&a[1][1][1]; q=(int*)a; //Please explain this line printf("%d%d"*p,*q); return 0; } Why we are doing typecasting here and what will be returned after type cast to q?
#include<stdio.h int main() { int a ={10,2,3,4,5,6,7,8}; int *p,*q; p=&a ; q=(int*)a; //Please explain this line printf("%d%d"*p,*q); return 0; }Why we are doing type...
junaid ahmad
319
views
junaid ahmad
asked
Dec 19, 2017
Programming in C
programming-in-c
pointers
+
–
5
votes
1
answer
2388
INSERTION IN AVL
Which of the following is highest upper bound that represents the time complexity of inserting an object into AVL tree with n-nodes. It must be 0(logn) right. What would be answer if it asked that element is continuously inserting in to a AVL tree.
Which of the following is highest upper bound that represents the time complexity of inserting an object into AVL tree with n-nodes.It must be 0(logn) right.What would be...
junaid ahmad
2.0k
views
junaid ahmad
asked
Dec 19, 2017
DS
data-structures
avl-tree
time-complexity
+
–
8
votes
1
answer
2389
Number of Binary tree
Q.Consider a four labeled 1, 2, 3, 4. The number of distinct binary tree are possible such that whose inorder traversal is 1, 2, 3, 4 are _________ Answer must be 14 right ?
Q.Consider a four labeled 1, 2, 3, 4. The number of distinct binary tree are possible such that whose inorder traversal is 1, 2, 3, 4 are _________Answer must be 14 right...
junaid ahmad
924
views
junaid ahmad
asked
Dec 19, 2017
Programming in C
tree-traversal
binary-tree
+
–
0
votes
0
answers
2390
GATE 2017
Consider the following C code: #include<stdio.h> int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); if (*x) { x = (int *)malloc( ... It is the same question https://gateoverflow.in/118293/gate2017-1-13 but i want to know that adding * in if condition will result in dangling pointer or not?
Consider the following C code:#include<stdio.h int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return...
Mk Utkarsh
2.0k
views
Mk Utkarsh
asked
Dec 19, 2017
Programming in C
usergate2017
usermod
+
–
0
votes
1
answer
2391
Zeal Test Series 2018: Programming & DS - Binary Search Trees
Given an initially empty Binary search tree how many different order of insertion order A,B,C,D,E,F,G that returns minimum height tree?
Given an initially empty Binary search tree how many different order of insertion order A,B,C,D,E,F,G that returns minimum height tree?
Anish Palan
741
views
Anish Palan
asked
Dec 18, 2017
DS
binary-search-tree
data-structures
zeal
zeal2018
+
–
1
votes
2
answers
2392
Pointers
Plz Explain with a diagram .
Plz Explain with a diagram .
dragonball
716
views
dragonball
asked
Dec 18, 2017
Programming in C
programming-in-c
pointers
+
–
0
votes
0
answers
2393
Question
Insert these element in avl tree 15,20,24,10,13,7,30,36,25 And then delete 24,20 Please explain step by step I am confuse
Insert these element in avl tree15,20,24,10,13,7,30,36,25And then delete 24,20Please explain step by stepI am confuse
nikkey123
1.5k
views
nikkey123
asked
Dec 18, 2017
Programming in C
algorithms
+
–
0
votes
0
answers
2394
GATE 2004 (85)with modification
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function g(x) for each node x. If the cost of computing g(x) is: min(number of leaf-nodesin left-subtree of x,number of leaf-nodesin right- ... of nodesin left-subtree of x,number of nodesin right-subtree of x) (i.e) it was number of nodes rather than leaf nodes
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function g(x) for each node x. If the cost of computing g(x) is: min...
A_i_$_h
444
views
A_i_$_h
asked
Dec 18, 2017
1
votes
1
answer
2395
please explain me
Consider the following pseudo-code to perform push and pop operation on a stack using enqueue(EQ) and dequeue(DQ) operations on 2 queues q1 and q2. Let x be an element to be pushed in the stack. Answer the following questions. push(q1,q2,x) { if(q1 is ... will be the total dequeue operations on queue q2, if we perform 6 push and 2 pop operations on the above algorithm? 10 8 12 5
Consider the following pseudo-code to perform push and pop operation on a stack using enqueue(EQ) and dequeue(DQ) operations on 2 queues q1 and q2.Let x be an element to ...
mohitbawankar
472
views
mohitbawankar
asked
Dec 18, 2017
1
votes
1
answer
2396
c programming
Consider the following function: int f(int n) { staticint i=1; if(n>5)return n; n=n+i; return f(n); } The value of f(1) is:
Consider the following function:int f(int n){staticint i=1;if(n>5)return n;n=n+i;return f(n);}The value of f(1) is:
mohitbawankar
285
views
mohitbawankar
asked
Dec 18, 2017
0
votes
1
answer
2397
c programming
#include<stdio.h> void main() { printf("Hello\b\b\b\b\b"); printf("Hi!\b\b\bBye"); }
#include<stdio.h>void main(){printf("Hello\b\b\b\b\b");printf("Hi!\b\b\bBye");}
mohitbawankar
327
views
mohitbawankar
asked
Dec 17, 2017
0
votes
1
answer
2398
cprogramming
#include<stdio.h> void main() { printf("Hello\b\b\b\b\b"); printf("Hi!\b\b\bBye"); }
#include<stdio.h>void main(){printf("Hello\b\b\b\b\b");printf("Hi!\b\b\bBye");}
mohitbawankar
381
views
mohitbawankar
asked
Dec 17, 2017
6
votes
3
answers
2399
ISRO-2017
Q.A strictly binary tree with 10 leaves A) cannot have more than 19 nodes B) has exactly 19 nodes C)has exactly 17 nodes D) has exactly 20 nodes
Q.A strictly binary tree with 10 leavesA) cannot have more than 19 nodesB) has exactly 19 nodesC)has exactly 17 nodesD) has exactly 20 nodes
junaid ahmad
7.3k
views
junaid ahmad
asked
Dec 17, 2017
Programming in C
isro2017
non-gate
+
–
3
votes
1
answer
2400
ISRO-2017
Consider the code segment int i,j,x,y,m,n; n=20; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i%2) { x+=((4*j)+5*i); y+=(7+4*j); } } } m=x+y; Which one of the following is false ? A) The code contains ... B) There is scope of common sub-expression elimination in this code C)There is scope of strength reduction in this code D)There is scope of dead code elimination in this code
Consider the code segmentint i,j,x,y,m,n; n=20; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i%2) { x+=((4*j)+5*i); y+=(7+4*j); } } } m=x+y;Which one of the following is fals...
junaid ahmad
2.7k
views
junaid ahmad
asked
Dec 17, 2017
Programming in C
isro2017
non-gate
+
–
Page:
« prev
1
...
115
116
117
118
119
120
121
122
123
124
125
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register