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
Most viewed questions in Programming and DS
4
votes
1
answer
2321
GATE Overflow | Data Structures | Test 1 | Question: 30
In a Network where bytes are continuously being transferred, it is required to identify the most frequently transferred byte. What would be an appropriate data structure for finding this? Linked List Array Dynamically growing Array Set
In a Network where bytes are continuously being transferred, it is required to identify the most frequently transferred byte. What would be an appropriate data structure ...
Arjun
820
views
Arjun
asked
Oct 10, 2016
DS
go-ds-1
data-structures
+
–
1
votes
0
answers
2322
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
819
views
srestha
asked
Mar 6, 2019
Programming in C
programming-in-c
ace-test-series
programming
+
–
0
votes
2
answers
2323
Made Easy Subject Test 2019: Programming & DS
void PrintValue(int n) { if (n < 0) return; else { printf(n); printValue(--n); printValue(n--); printf(n); } } Output for Print(5) ?
void PrintValue(int n) { if (n < 0) return; else { printf(n); printValue( n); printValue(n ); printf(n); } }Output for Print(5) ?
Na462
819
views
Na462
asked
Jan 16, 2019
Programming in C
programming
programming-in-c
made-easy-test-series
+
–
0
votes
0
answers
2324
Self Doubt
Please correct if any of the point is wrong : Quicksort: 1.Need more random accesses 2 Used when Random access is fast (hence preferred on array and not on Linked List) 2 No extra space needed ==> Inplace 4 Not a stable sorting algorithm ... : Quicksort in particular exhibits good cache locality and this makes it faster than merge sort in many cases like in virtual memory environment.
Please correct if any of the point is wrong :Quicksort:1.Need more random accesses2 Used when Random access is fast (hence preferred on array and not on Linked List)2 No ...
jatin khachane 1
819
views
jatin khachane 1
asked
Dec 21, 2018
Programming in C
programming
data-structures
sorting
+
–
3
votes
1
answer
2325
C Program
#include <stdio.h> char *str[]={"FirstSring","Is","Already","Written"}; char **strp[]={str+3,str+2,str+1,str}; char ***strpp=strp; int main(void) { printf("%s",**++strpp); printf("%s",*--*++strpp+3); return 0; } Output of this, and the interpretation?
#include <stdio.h char *str[]={"FirstSring","Is","Already","Written"}; char strp[]={str+3,str+2,str+1,str}; char *strpp=strp; int main(void) { printf("%s", ++strpp); pr...
Samujjal Das
819
views
Samujjal Das
asked
Jan 21, 2017
1
votes
1
answer
2326
Function in C
All functions have file scope. Thus, you cannot define a function within a function. This is why C is not technically a block-structured language.Explain pls ?
All functions have file scope. Thus, you cannot define a function within a function. This is why C is not technically a block-structured language.Explain pls ?
ManojK
819
views
ManojK
asked
Sep 9, 2016
Programming in C
programming-in-c
+
–
0
votes
3
answers
2327
what is output of program
int f(int); int main() { int b; b = f(20); printf("%d",b); return 0; } int f(int a){ a>10 ?return(20):return 10; }
int f(int); int main() { int b; b = f(20); printf("%d",b); return 0; } int f(int a){ a>10 ?return(20):return 10; }
indrajeet
819
views
indrajeet
asked
Feb 1, 2016
Programming in C
programming-in-c
+
–
0
votes
1
answer
2328
Test series
Consider unsorted doubly linked list data structure containing n items. For decrease key operation a pointer is provided to the record on which the operation is performed. An algorithm performs the following operations on the list in this order: sqrt(n) insert operations, o(nlogn) decrease key and ... of all these operations put together? (a) O(n) (b) O(n2) (c) O(n2logn) (d) O(sqrt(n))
Consider unsorted doubly linked list data structure containing n items. For decrease key operation a pointer is provided to the record on which the operation is performed...
Somoshree Datta 5
818
views
Somoshree Datta 5
asked
Oct 22, 2018
DS
data-structures
linked-list
time-complexity
+
–
1
votes
1
answer
2329
ISI2016-PCB-CS-1
Consider the array $A=[20,13,19,8,3,5,4]$ that represents a heap. Draw the heap after removing the element $20.$ List all the distinct integer keys $k$ such that, when $k$ is inserted in the Binary Search Tree of Figure $1,$ its height increases. Note that you are not allowed to insert an already existing key again. Justify your answer.
Consider the array $A=[20,13,19,8,3,5,4]$ that represents a heap. Draw the heap after removing the element $20.$List all the distinct integer keys $k$ such that, when $k$...
go_editor
818
views
go_editor
asked
Sep 18, 2018
DS
isi2016-pcb-cs
tree
binary-search-tree
descriptive
+
–
0
votes
1
answer
2330
Doubt
Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records. Why?
Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records...
Angkit
818
views
Angkit
asked
Jun 13, 2017
Programming in C
programming-in-c
+
–
0
votes
1
answer
2331
physics wallah dpp
_Harshit
816
views
_Harshit
asked
Mar 18, 2023
Programming in C
programming-in-c
pointers
physicswallah
+
–
1
votes
1
answer
2332
TIFR CSE 2021 | Part B | Question: 2
Let $L$ be a singly-linked list $X$ and $Y$ be additional pointer variables such that $X$ points to the first element of $L$ and $Y$ points to the last element of $L$. Which of the following operations cannot be done in time that is ... after the last element of $L$. Add an element before the first element of $L$. Interchange the first two elements of $L$.
Let $L$ be a singly-linked list $X$ and $Y$ be additional pointer variables such that $X$ points to the first element of $L$ and $Y$ points to the last element of $L$. Wh...
soujanyareddy13
816
views
soujanyareddy13
asked
Mar 25, 2021
DS
tifr2021
data-structures
linked-list
+
–
1
votes
2
answers
2333
CMI2017-A-09
Suppose we constructed the binary search tree shown below by starting with an empty tree and inserting one element at a time from an input sequence, without any rotations or other manipulations. Which of the following assertions about the order of elements in the input sequence $cannot$ be ... came after $12$ and $29$ came before $42$. $3$ came before $14$ and $16$ came before $28$.
Suppose we constructed the binary search tree shown below by starting with an empty tree and inserting one element at a time from an input sequence, without any rotations...
Tesla!
816
views
Tesla!
asked
Feb 4, 2018
DS
cmi2017
data-structures
binary-search-tree
+
–
3
votes
1
answer
2334
MOCK TEST DATA STRUCTURE
Consider a two-dimensional array with elements stored in the form of lower triangular matrix. The elements must be crossed to read A[4, 2] from the array A[–6, ..., + 8, –6,..., + 8] whose base address 1000 is ________. (Assume elements are stored in row major order)
Consider a two-dimensional array with elements stored in the form of lower triangular matrix. The elements must be crossed to read A[4, 2] from the array A[–6, ..., + 8...
mohitbawankar
816
views
mohitbawankar
asked
Jan 14, 2018
3
votes
1
answer
2335
GATE CSE 1989 | Question: 4-xi
Express the following list in terms of a linked list structure suitable for internal representation. $(((ab)c)d((e)))$
Express the following list in terms of a linked list structure suitable for internal representation.$(((ab)c)d((e)))$
makhdoom ghaya
816
views
makhdoom ghaya
asked
Nov 30, 2016
DS
gate1989
descriptive
data-structures
linked-list
unsolved
+
–
3
votes
1
answer
2336
Hashing+Probaility
Rahul Jain25
816
views
Rahul Jain25
asked
Oct 8, 2016
DS
hashing
probability
uniform-hashing
binomial-distribution
+
–
0
votes
3
answers
2337
Stacks
The maximum size of the operator stack when converting the following infix to postfix expression a ^ b * c * d + e * f ^ g (assume that “^” has highest precedence and right associativity) and also output the postfix expression.
The maximum size of the operator stack when converting the following infix to postfix expressiona ^ b * c * d + e * f ^ g (assume that “^” has highest precedence and ...
vivek1211
815
views
vivek1211
asked
Nov 6, 2022
Programming in C
data-structures
stack
infix-prefix
+
–
2
votes
0
answers
2338
GATE Overflow | Mock GATE | Test 1 | Question: 36
#include<stdio.h> #define create_node struct node {char x, y;}; #define call_main int main() { #define create_pointer struct node *p=&obj; #define create_object(a,b) struct node obj={b+a,a}; #define print_value printf("%c", *((char*)p+1 ... are correct Only $2$ and $3$ are correct $1$, $2$ and $4$ are correct Only $3$ is correct
#include<stdio.h>#define create_node struct node {char x, y;};#define call_main int main() {#define create_pointer struct node *p=&obj;#define create_object(a,b) struct n...
Ruturaj Mohanty
815
views
Ruturaj Mohanty
asked
Dec 27, 2018
Programming in C
go-mockgate-1
programming
pointers
programming-in-c
+
–
7
votes
3
answers
2339
Output of program. Please explain how this works
What is the output of the following program? #include<stdio.h> int main() { int array[]={10, 20, 30, 40}; printf(“%d”, -2[array]); return 0; } $-60$ $-30$ $60$ Garbage value
What is the output of the following program?#include<stdio.h int main() { int array[]={10, 20, 30, 40}; printf(“%d”, -2[array]); return 0; }$-60$$-30$$60$Garbage valu...
Parshu gate
814
views
Parshu gate
asked
Nov 20, 2017
Programming in C
programming-in-c
output
programming
pointers
+
–
0
votes
1
answer
2340
Prog \ What is the output of this program?
#include<stdio.h> int main() { int a[10][20][30] = {0}; int *b = a; int *c = a+1; printf("%ld", c-b); return 0; }
#include<stdio.h int main() { int a[10][20][30] = {0}; int *b = a; int *c = a+1; printf("%ld", c-b); return 0; }
Desert_Warrior
814
views
Desert_Warrior
asked
May 16, 2016
Programming in C
programming-in-c
pointers
+
–
Page:
« prev
1
...
112
113
114
115
116
117
118
119
120
121
122
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register