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
1
answer
2431
UGC NET CSE | November 2017 | Part 3 | Question: 20
Heap allocation is required for languages that Use dynamic scope rules Support dynamic data structures Support recursion Support recursion and dynamic data structures
Heap allocation is required for languages thatUse dynamic scope rulesSupport dynamic data structuresSupport recursionSupport recursion and dynamic data structures
Arjun
564
views
Arjun
asked
Nov 5, 2017
DS
ugcnetcse-nov2017-paper3
data-structures
binary-heap
+
–
1
votes
2
answers
2432
virtualgate
I am getting answer as 9 T(3,1) -> T(2,3) - T(1,7) I got T(1,7) value as 9 .
I am getting answer as 9T(3,1) - T(2,3) - T(1,7) I got T(1,7) value as 9 .
Niharika 1
322
views
Niharika 1
asked
Nov 4, 2017
1
votes
1
answer
2433
what will the value printed by code
set2018
368
views
set2018
asked
Nov 4, 2017
Programming in C
programming
pointers
+
–
1
votes
0
answers
2434
tower of hanoi DOUBT
in tower ,smallest disk req, 2n-1 moves right ?
in tower ,smallest disk req, 2n-1 moves right ?
mohitbawankar
211
views
mohitbawankar
asked
Nov 2, 2017
1
votes
1
answer
2435
Programming
Choose the right option. #define X 8 int main(void) { cout<<++X; return 0; } A) 8 B) 9 C) Garbage Value C) Compile Error
Choose the right option.#define X 8 int main(void) { cout<<++X; return 0; }A) 8 B) 9C) Garbage Value C) Compile Error
Rohit Gupta 8
286
views
Rohit Gupta 8
asked
Nov 1, 2017
Programming in C
programming-in-c
programming
output
+
–
1
votes
1
answer
2436
BINARY TREE
A rooted tree with 8 nodes has its nodes [1.....8] in preorder.When the tree is traversed in postorder.....nodes visited are {3,5,4,2,7,8,6,1}. Draw a tree for it. How to solve .....someone please explain?
A rooted tree with 8 nodes has its nodes [1.....8] in preorder.When the tree is traversed in postorder.....nodes visited are{3,5,4,2,7,8,6,1}.Draw a tree for it.How to s...
Shivi rao
667
views
Shivi rao
asked
Nov 1, 2017
DS
binary-tree
data-structures
+
–
1
votes
0
answers
2437
BST tree
The number of BST possible with 6 nodes numbered 1,2,3,4,5,6 with exactly 1 leaf node __________
The number of BST possible with 6 nodes numbered 1,2,3,4,5,6 with exactly 1 leaf node __________
srestha
431
views
srestha
asked
Oct 31, 2017
DS
data-structures
binary-search-tree
+
–
1
votes
2
answers
2438
Programming -3
fun(a,b) { if(a<0 && b<0) return 0; else if(a==0) return b+1; else if(b==0) return fun(a-1,1); else return fun(a-1,fun(a,b-1)); } compute fun(3,1)
fun(a,b) { if(a<0 && b<0) return 0; else if(a==0) return b+1; else if(b==0) return fun(a-1,1); else return fun(a-1,fun(a,b-1)); }compute fun(3,1)
srestha
1.2k
views
srestha
asked
Oct 31, 2017
Programming in C
programming-in-c
programming
+
–
1
votes
0
answers
2439
quradratic probing
which is correct method for QP : 1) 2) H(k) = (H+ i^2)mod m
which is correct method for QP :1) 2) H(k) = (H+ i^2)mod m
Hira Thakur
402
views
Hira Thakur
asked
Oct 31, 2017
DS
hashing
+
–
1
votes
0
answers
2440
I have problem to understand the following question , help me to sort it out ?
A hash table with ten buckets with one slot per bucket is shown in the following figure. The symbols S1 to S7 initially entered using a hashing function with linear probing.The maximum number of comparisons needed in ... needed in searching an item that is not present is ?What does it means respect to this diagram ?
A hash table with ten buckets with one slot per bucket is shown in the following figure. The symbols S1 to S7 initially entered using a hashing function with linear probi...
hem chandra joshi
1.1k
views
hem chandra joshi
asked
Oct 30, 2017
DS
hashing
+
–
1
votes
0
answers
2441
MadeEasy Subject Test: Programming & DS - Hashing
https://gateoverflow.in/?qa=blob&qa_blobid=11318007552752576944 Answer given is : 40/121
https://gateoverflow.in/?qa=blob&qa_blobid=11318007552752576944Answer given is : 40/121
charul
718
views
charul
asked
Oct 30, 2017
DS
made-easy-test-series
data-structures
hashing
+
–
1
votes
0
answers
2442
Ace Test Series: Programming & DS - Programming In C
What is the output of below code considering the size of short int is 2, char is 1 and int is 4 bytes. #include<stdio.h> main() { short int i = 20; char c = 97; printf("%d, %d, %d \n", sizeof(i), sizeof(c), sizeof(c+i)); return 0; } (a) 2, 1, 2 (b) 2, 1, 1 (c) 2, 1, 4 (d) 2, 2, 8
What is the output of below code considering the size of short int is 2, char is 1 and int is 4 bytes.#include<stdio.h>main(){short int i = 20;char c = 97;printf("%d, %d,...
Aibi
1.6k
views
Aibi
asked
Oct 30, 2017
Programming in C
programming-in-c
programming
pointers
output
ace-test-series
+
–
1
votes
1
answer
2443
Data Structure
Which data structure can be used to implement a collection of elements with following constraints in most efficient manner? Constraints: Items are retrieved and removed in FIFO order. There is no limits in number of elements Size of an item is relatively larger than storage required for memory ... pointer to 1st node IV) Binary tree a) I and II b) IV and III c)II and IV d) II and III
Which data structure can be used to implement a collection of elements with following constraints in most efficient manner?Constraints:Items are retrieved and removed in ...
srestha
731
views
srestha
asked
Oct 29, 2017
DS
data-structures
+
–
1
votes
2
answers
2444
Circular queue
The initial configuration of circular queue as follows What is status of states of queue contents after the following sequence of steps enqueue x dequeue enqueue y dequeue dequeue a)x,y,____,_____,_____ b)x,___,y,____,____ c)____,_____,x,y,____ d)_____,x,y,_____,_____
The initial configuration of circular queue as followsWhat is status of states of queue contents after the following sequence of stepsenqueue xdequeueenqueue ydequeuedequ...
srestha
2.8k
views
srestha
asked
Oct 29, 2017
DS
data-structures
circular-queue
queue
easy
+
–
1
votes
1
answer
2445
Linked List
Consider the following program struct node { int value; Node *next; } boolean fun(Node *head) { Node *a,*b; a=head; if(a==NULL) return TRUE; b=a->next; while(b!=NULL && b!=a) { b=b->next; if(b==NULL) return TRUE; b=b->next; a=a->next; } return(b==NULL); } Is the following code return this? a)
Consider the following programstruct node { int value; Node *next; } boolean fun(Node *head) { Node *a,*b; a=head; if(a==NULL) return TRUE; b=a->next; while(b!=NULL && b!...
srestha
691
views
srestha
asked
Oct 28, 2017
DS
linked-list
data-structures
+
–
1
votes
1
answer
2446
self doudt
#include<stdio.h> void foo(int*); int main() { int x=30,*a=&x; foo(a++); } void foo(int* a) { printf("%d\n",*a); } this program gives output=30; _____ #include<stdio.h> void foo(int*); int main() { int x=30; foo((&x)++); } void foo(int* a) { printf("%d\n",*a); } But this is giving compiler error Why?
#include<stdio.h>void foo(int*);int main(){ int x=30,*a=&x; foo(a++);}void foo(int* a){ printf("%d\n",*a);} this program gives output=30;_____#include<stdio.h>vo...
Nils
210
views
Nils
asked
Oct 28, 2017
1
votes
0
answers
2447
Array
Consider X[1...n] and Y[1...n] be two arrays, each containing n numbers both of which already sorted. What is the time complexity to find the median by combining two arrays? O(n) O(log n) O(nlogn) O(loglog n)
Consider X[1...n] and Y[1...n] be two arrays, each containing n numbers both of which already sorted. What is the time complexity to find the median by combining two arra...
srestha
1.1k
views
srestha
asked
Oct 28, 2017
DS
array
data-structures
+
–
1
votes
1
answer
2448
pointers
int main() { int i,j; char a[2][3]={{'a','b','c'},{'d','e','f'}}; char b[3][2]; char *p=*b; for(i=0;i<2;i++) { for(j=0;j<3;j++) { *(p+2*j+i)=a[i][j]; } } } please explain this...
int main() { int i,j; char a [3]={{'a','b','c'},{'d','e','f'}}; char b[3] ; char *p=*b; for(i=0;i<2;i++) { for(j=0;j<3;j++) { *(p+2*j+i)=a[i][j]; } } }please explain this...
saipriyab
463
views
saipriyab
asked
Oct 26, 2017
Programming in C
programming-in-c
+
–
1
votes
2
answers
2449
C. interesting scenario.
Can you see why the output of the following code is 256? main () { int a=0x1ff; char *careful= &a; *careful = 0; printf("%d", a); }
Can you see why the output of the following code is 256?main () { int a=0x1ff; char *careful= &a; *careful = 0; printf("%d", a); }
AskHerOut
514
views
AskHerOut
asked
Oct 24, 2017
Programming in C
programming
programming-in-c
output
+
–
1
votes
0
answers
2450
c programming
int main() { int array[] = {3, 5, 1, 4, 6, 2}; int done = 0; int i; while (done == 0) { done = 1; for (i = 0; i <= 4; i++) { if (array[i] = 1; i--) { if (array[i] > array[i-1]) { swap(&array[i], &array[i-1]); done = 0; } } } printf("%d", array[3]); } The output of the program is _____.
int main() { int array[] = {3, 5, 1, 4, 6, 2}; int done = 0; int i; while (done == 0) { done = 1; for (i = 0; i <= 4; i++) { if (array[i] = 1; i ) { if (array[i] array[i...
Kaluti
221
views
Kaluti
asked
Oct 24, 2017
Page:
« prev
1
...
117
118
119
120
121
122
123
124
125
126
127
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register