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
Highest voted questions in Programming and DS
1
votes
2
answers
1961
c functions
#include <stdio.h> void demo() { printf("GeeksQuiz "); } int main() { demo(); return 0; } ****************************************************************************** #include <stdio.h> int main() { demo(); return 0; } void demo() { printf("GeeksQuiz "); } will both program same result?
#include <stdio.h void demo() { printf("GeeksQuiz "); } int main() { demo(); return 0; } #include <stdio.h int main() { demo(); re...
hitendra singh
835
views
hitendra singh
asked
Mar 29, 2019
1
votes
2
answers
1962
Pointer question-C
Anyone kindly tell the reason why the outputs are differ ? #include<stdio.h> int main() { char *ptr = "geeksforgeeks"; printf("%c\n", *&*&*ptr); getchar(); return 0; } Output-g #include<stdio.h> int main() { char *ptr = "geeksforgeeks"; printf("%s\n", *&*&ptr); getchar(); return 0; } Output-geeksforgeeks
Anyone kindly tell the reason why the outputs are differ ?#include<stdio.h>int main(){ char *ptr = "geeksforgeeks"; printf("%c\n", *&*&*ptr); getchar(); return 0;}Outp...
val_pro20
1.5k
views
val_pro20
asked
Mar 24, 2019
Programming in C
programming-in-c
pointers
+
–
1
votes
1
answer
1963
Self Doubt on scoping
int x = 5, y = 10 ; void main ( ) { int i = 2, j = 3 A (i, j); } void A (int i, int j) { int x = 10, y = 5 ; i = i + x : j = i + y : printf ("%d %d", i, j); B (i, j); } void B (int i, int j) { i ... by-name 3. call-by-need 4. call-by-value 5.Static scoping 6.Dynamic scoping Any reference for call by name and call by need Is for static coping $12,17,54$ or $12,17,59$?
int x = 5, y = 10 ; void main ( ) { int i = 2, j = 3 A (i, j); } void A (int i, int j) { int x = 10, y = 5 ; i = i + x : j = i + y : printf ("%d %d", i, j); B (i, j); } v...
srestha
476
views
srestha
asked
Mar 23, 2019
Programming in C
programming-in-c
dynamic-scoping
parameter-passing
+
–
1
votes
1
answer
1964
Self doubt
I have a confusion regarding the array implementation of binary tree ,i.e what are the index locations of the left child of a node whether it is 2i+1 or 2i and same for right child ,can anyone explain?
I have a confusion regarding the array implementation of binary tree ,i.e what are the index locations of the left child of a node whether it is 2i+1 or 2i and same for r...
Winner
886
views
Winner
asked
Mar 17, 2019
DS
data-structures
+
–
1
votes
0
answers
1965
Geeks for Geeks : C Program
In the above 4 Statements which would print 123 as output ? Explain also.
In the above 4 Statements which would print 123 as output ? Explain also.
Ashish Roy 1
1.7k
views
Ashish Roy 1
asked
Mar 16, 2019
Programming in C
programming-in-c
output
pointers
programming
+
–
1
votes
1
answer
1966
Internal Path Length of BST
Consider the following binary tree with root at level 0. What is the internal path length for the above tree? 31 14 29 32
Consider the following binary tree with root at level 0. What is the internal path length for the above tree?31142932
s_dr_13
2.8k
views
s_dr_13
asked
Mar 10, 2019
DS
data-structures
binary-tree
+
–
1
votes
1
answer
1967
#operator precedence and associativity
#include<stdio.h> int x = 0; int f1() { x = 5; return x; } int f2() { x = 10; return x; } int main() { printf("%d \n", f1()); printf("%d \n", f2()); int p = f1() + f2(); printf("%d ", x); return 0; } what is the output when int p= f1()+f2(); is called and how this is came?????? thank you…!
#include<stdio.h int x = 0; int f1() { x = 5; return x; } int f2() { x = 10; return x; } int main() { printf("%d \n", f1()); printf("%d \n", f2()); int p = f1() + f2(); p...
shiva0
834
views
shiva0
asked
Mar 10, 2019
1
votes
0
answers
1968
ACE test Series: Programming and DS-Programming
void find(int x){ static int i=10,y=0; y=y+i; for(i;i>0;i=i-10){ if(x!=0) find(x-1); else{ printf("%d",y); } } } What will be output printed for find(4)?
void find(int x){ static int i=10,y=0; y=y+i; for(i;i>0;i=i-10){ if(x!=0) find(x-1); else{ printf("%d",y); } } }What will be output printed for find(4)?
srestha
806
views
srestha
asked
Mar 6, 2019
Programming in C
programming-in-c
ace-test-series
programming
+
–
1
votes
0
answers
1969
Locality of Rference(OS+DS) (ACE)
An OS uses virtual memory with paging technique for memory allocation. Which of the following searching technique on given data structure use locality of reference? Linear search on linked list Binary search on array Linear search on array Binary search on linked list
An OS uses virtual memory with paging technique for memory allocation. Which of the following searching technique on given data structure use locality of reference?Linear...
srestha
1.2k
views
srestha
asked
Mar 2, 2019
Programming in C
array
linked-list
+
–
1
votes
1
answer
1970
NPTEL CODING ASSIGNMENT
Consider a matrix M of integers. Divide M into 4 sub-matrices. These sub-matrices are called as Quadrants. Report the Quadrant number which has the smallest minimum-element. If two or more quadrants have same smallest minimum, report the smallest ... than 1 and less than 12 OUTPUT FORMAT: Print in a separate line, the quadrant number with the smallest minimum-element.
Consider a matrix M of integers. Divide M into 4 sub-matrices. These sub-matrices are called as Quadrants. Report the Quadrant number which has the smallest minimum-eleme...
himgta
1.8k
views
himgta
asked
Feb 18, 2019
1
votes
2
answers
1971
Array
Tell me the difference : &(arr+1) and &arr+1
Tell me the difference :&(arr+1) and &arr+1
Ahsanul Hoque
1.3k
views
Ahsanul Hoque
asked
Feb 17, 2019
Programming in C
programming-in-c
pointers
array
+
–
1
votes
1
answer
1972
sizeof
#include <stdio.h> int main() { int a = 1; char d[] = "ab"; printf("%d", sizeof(a+d)); return 0; } Explain the Output
#include <stdio.h int main() { int a = 1; char d[] = "ab"; printf("%d", sizeof(a+d)); return 0; }Explain the Output
Shiva Sagar Rao
705
views
Shiva Sagar Rao
asked
Feb 16, 2019
Programming in C
programming-in-c
sizeof-operator
+
–
1
votes
1
answer
1973
Max heap
Conversion of binary search tree into a Max heap takes: O(n) time O(nlog n) time None
Conversion of binary search tree into a Max heap takes:O(n) timeO(nlog n) timeNone
gate_forum
372
views
gate_forum
asked
Feb 13, 2019
1
votes
0
answers
1974
Trees
StateTrue/False: Conversion of Max heap into a binary search tree takes O(n) time.
StateTrue/False:Conversion of Max heap into a binary search tree takes O(n) time.
gate_forum
307
views
gate_forum
asked
Feb 11, 2019
1
votes
2
answers
1975
GATE 2019 - The number of times printf statement is executed is:
int main() { float sum, i = 1.0, j = 2.0; while (i/j > 0.0625) { j = j + j; printf("%f", i+j); } } The number of times printf statement is executed is:
int main(){float sum, i = 1.0, j = 2.0;while (i/j 0.0625){j = j + j;printf("%f", i+j);}}The number of times printf statement is executed is:
Parimal Paritosh
991
views
Parimal Paritosh
asked
Feb 6, 2019
1
votes
0
answers
1976
gate 2019
Consider the following statements. (i) In max Heap smallest element is at the leaf node. (ii) In max Heap second largest element always the child of root. (iii) Binary search tree can be constructed from max heap in θ(n). (iv) Max Heap can be build from Binary search tree in θ(n) Which of the above ... ) and (iii) (b) (i), (ii) and (iv) (c) (ii), (iii) and (iv) (d) (i), (iii) and (iv)
Consider the following statements. (i) In max Heap smallest element is at the leaf node.(ii) In max Heap second largest element always the child of root.(iii) Binary sear...
pream sagar
2.0k
views
pream sagar
asked
Feb 4, 2019
1
votes
2
answers
1977
ME FLT2
AVL tree is constructed by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order. (Assume the tree is initially empty). Then the level order traversal of the above binary tree will be.. Answer given is: 3,2,5,1,4,6,7
AVL tree is constructed by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order. (Assume the tree is initially empty).Then the level order traversal of the above bin...
balchandar reddy san
598
views
balchandar reddy san
asked
Jan 28, 2019
Programming in C
data-structures
+
–
1
votes
1
answer
1978
Made easy tree height
The height of a binary tree is defined as the number of nodes in the longest path from root to the leaf node. Let X be the height of a complete binary tree with 256 nodes. Then the value of X will be Answer 9
The height of a binary tree is defined as the number of nodes in the longest path from root to the leaf node. Let X be the height of a complete binary tree with 256 nodes...
Ram Swaroop
1.3k
views
Ram Swaroop
asked
Jan 28, 2019
DS
data-structures
binary-tree
+
–
1
votes
1
answer
1979
made easy test
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...
pream sagar
1.8k
views
pream sagar
asked
Jan 26, 2019
1
votes
2
answers
1980
made easy
Consider the following C program: Which of the following represents output of above C program? A)1, 0 B)2, 0 C)1, 1 D)2, 1
Consider the following C program: Which of the following represents output of above C program?A)1, 0B)2, 0C)1, 1D)2, 1
pream sagar
301
views
pream sagar
asked
Jan 26, 2019
Page:
« prev
1
...
94
95
96
97
98
99
100
101
102
103
104
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register