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
Hot questions in Programming and DS
0
votes
0
answers
1741
Self Doubt:Call by name
main() { int ar[5],a=0; ar={4,5,6,0,3} fun(ar[a],ar[ar[a]) } // will the called function be resolved to fun(0,3) at compile time ?? [Code Optimization:Folding]
main(){int ar[5],a=0; ar={4,5,6,0,3}fun(ar[a],ar[ar[a])}// will the called function be resolved to fun(0,3) at compile time ?? [Code Optimization:Folding]
Abhisek Tiwari 4
250
views
Abhisek Tiwari 4
asked
Jan 3, 2019
2
votes
1
answer
1742
#made easy
Stack A has entries a,b,c,d(with a on top).Stack B is empty. An entry popped out of stack A is pushed into stack B. An entry popped out of stack B can only be printed. The no. of possible permutation for printing the elements are __ ? 24 12 21 14 can anybody give a generalized formula with explanation for this ?
Stack A has entries a,b,c,d(with a on top).Stack B is empty.An entry popped out of stack A is pushed into stack B.An entry popped out of stack B can only be printed.The n...
Satbir
263
views
Satbir
asked
Dec 19, 2018
Programming in C
doubt
+
–
0
votes
1
answer
1743
Can one describe it in easy meaning ?
An algorithm performs (log N)1/2 find operations , N insert operations, (log N)1/2 delete operations, and (log N)1/2 decrease-key operations on a set of data items with keys drawn from a linearly ordered set . For ... to achieve the best total asymptotic complexity considering all the operations? Unsorted array Min - heap Sorted array Sorted doubly linked list
An algorithm performs (log N)1/2 find operations , N insert operations, (log N)1/2 delete operations, and (log N)1/2 decrease-key operations on a set of data items with k...
Wanted
368
views
Wanted
asked
Jan 13, 2017
1
votes
3
answers
1744
Made Easy test series DS
The number of binary search trees possible with 12 keys, when keys 1, 2, 3, 4, ........ 12 are inserted into empty Binary Search Tree with condition such that 4 is the root of binary search tree and 8 is immediate right child of 4 are ________.
The number of binary search trees possible with 12 keys, when keys 1, 2, 3, 4, ........ 12 are inserted into empty Binary Search Tree with condition such that 4 is the r...
Sambhrant Maurya
1.7k
views
Sambhrant Maurya
asked
Jul 27, 2018
DS
combinatory
tree
+
–
0
votes
1
answer
1745
No Book
Which of the following data structure is efficient to implement priority queue with basic operation such as insertion, deletion and searching? A) Linked list B) Sorted array C) Heap D) Hash table
Which of the following data structure is efficient to implement priority queue with basic operation such as insertion, deletion and searching?A) Linked listB) Sorted arra...
kavya kamish upadhya
564
views
kavya kamish upadhya
asked
Dec 18, 2018
0
votes
0
answers
1746
ME testseries
Vipin Rai
191
views
Vipin Rai
asked
Jan 5, 2019
0
votes
0
answers
1747
UPPCL AE 2018:59
Consider the following $\text{C}$ program. #include<stdio.h> #define XOR(a, b) (a) ^ (b) void func (int *a, int *b) { *a = XOR (*b, *a); *b = XOR (*a, *b); *a = XOR (*b, *a); } main() { int a = 10, b = 20; func (&a , &b); printf(“%d %d \n”,a,b); } What will be the output of the program? $20 \; 10$ $20 \; 20$ $10 \; 10$ $10 \; 20$
Consider the following $\text{C}$ program.#include<stdio.h #define XOR(a, b) (a) ^ (b) void func (int *a, int *b) { *a = XOR (*b, *a); *b = XOR (*a, *b); *a = XOR (*b, *a...
admin
265
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
0
votes
0
answers
1748
ME-FT
consider the following function secret (). unsigned char secret(unsigned char x,int y) { return ((x & 0x0F)<<y | (x & 0xF0)>>y); } int main() { unsigned char x=100; printf(“ %u”,secret(x,4)); return0; } the output obtained corresponding to the function call secret(100,4) is _
consider the following function secret (). unsigned char secret(unsigned char x,int y) { return ((x & 0x0F)<<y | (x & 0xF0)>>y); } int main() { unsigned char x=100; ...
Prateek Raghuvanshi
452
views
Prateek Raghuvanshi
asked
Dec 23, 2018
Programming in C
programming-in-c
+
–
2
votes
0
answers
1749
MadeEasy Subject Test 2019: Programming & DS - Stack
I THING THERE IS MISTAKE BECAUSE BRACKET ARE CLOSING AFTER ELEMENT E SO ALL OPERATORS HOULD BE POPED AND AND ACCORDING TO ME ANWER SHOLD BE 2… TRY AND CORRECT IF I M WRONG !!!! THANKS IN ADVANCE!!!
I THING THERE IS MISTAKE BECAUSE BRACKET ARE CLOSING AFTER ELEMENT E SO ALL OPERATORS HOULD BE POPED AND AND ACCORDING TO ME ANWER SHOLD BE 2…TRY AND CORRECT IF I M WR...
CHïntän ÞäTël
470
views
CHïntän ÞäTël
asked
Dec 7, 2018
Programming in C
made-easy-test-series
data-structures
stack
infix-prefix
+
–
1
votes
0
answers
1750
Please tell me the logic for x = 3 > 2 > 1;
What is the logic behind this code. #include <stdio.h> void main() { int x; x = 3 > 2 > 1; printf("%d", x); return; }
What is the logic behind this code.#include <stdio.h void main() { int x; x = 3 2 1; printf("%d", x); return; }
`JEET
307
views
`JEET
asked
Dec 26, 2018
0
votes
0
answers
1751
Calculate output
Find out the output of the given program? include<stdio.h> int main() { char s[] = "Hello"; char *ptr = s ; *ptr++; // please explain this line ptr++; printf("%s",ptr); return 0; }
Find out the output of the given program?include<stdio.h int main() { char s[] = "Hello"; char *ptr = s ; *ptr++; // please explain this line ptr++; ...
Abhishek Kumar 38
333
views
Abhishek Kumar 38
asked
Dec 26, 2018
Programming in C
programming-in-c
+
–
0
votes
0
answers
1752
UPPCL AE 2018:25
Consider the following code. #include<stdio.h> int main(int argc, char **argv) { printf(“%s\n”, argv[0]); return 0; } If the program is compiled to an executable file named simple, what will be the output of the program when executed with the following command: ./simple hello world World Hello Segmentation fault ./simple
Consider the following code.#include<stdio.h int main(int argc, char argv) { printf(“%s\n”, argv[0]); return 0; }If the program is compiled to an executable fi...
admin
254
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
0
votes
1
answer
1753
self doubt
Please solve this by taking some example Back edge cross edge tree edge Thankyou.
Please solve this by taking some exampleBack edgecross edgetree edgeThankyou.
iamdeepakji
423
views
iamdeepakji
asked
Dec 27, 2018
Programming in C
data
data-structures
+
–
1
votes
0
answers
1754
NOTE_C/DS_1_30
Consider the following program: void ME(int n) { printf(“*”); if(n>1) { ME(n/4); ME(n/4); ME(n/4); ME(n/4); } } lets X be the number of asterisks printed by the above function when n=1024. Then the value of X will be___________. (Hint: take n as a power of 4)
Consider the following program:void ME(int n){ printf(“*”); if(n>1) { ME(n/4); ME(n/4); ...
BOB
541
views
BOB
asked
Dec 17, 2018
0
votes
0
answers
1755
3D Array
Given a 3D array A[2:8,-4:1,6:10] stored in a row major order, if the base address is 200 and size of an element is 4 byte, what is the address of A[5][-2][8]? 1)608 2)534 3)428 4)422 Is this formula is correct.Using this ... . But answer of above question is 608. HOW????.Please Explain along with formula for calculating 3D Array. (Source:Classic Data Structure Book By Debashish Samanta )
Given a 3D array A[2:8,-4:1,6:10] stored in a row major order, if the base address is 200 and size of an element is 4 byte, what is the address of A[5][-2][8]?1)6082)5343...
Dhananjay15
1.6k
views
Dhananjay15
asked
Oct 3, 2018
0
votes
0
answers
1756
ME Test Series
A sen B men C athe D vin
A sen B men C atheD vin
Shadan Karim
282
views
Shadan Karim
asked
Dec 30, 2018
0
votes
0
answers
1757
function on C programming Language
Since we know that In function,the function name itself can act as the address to the function just like it was happening in array. So the given below program is correctly working:- #include<stdio.h> int sum(int x,int y) { return x+y; } int (*fb)( ... sum; or fb=∑ both are equivalent and (*fb)(8,6) and (fb)(8,6) are equivalent. How this is happening?
Since we know that In function,the function name itself can act as the address to the function just like it was happening in array. So the given below program is correct...
suraj prasad shaw
454
views
suraj prasad shaw
asked
Dec 15, 2018
0
votes
1
answer
1758
aai 2018
Which of the following is the time complexity to find the determinant of an upper- triangular matrix of order n*n? O(n^2.5) O(n) O(n^2) O(1)
Which of the following is the time complexity to find the determinant of an upper- triangular matrix of order n*n? O(n^2.5) O(n) O(n^2) O(1)
pream sagar
474
views
pream sagar
asked
Dec 13, 2018
0
votes
0
answers
1759
data structure
let R be the class of recursive program and l be the class of iterative program now consider below statement S S : every program in R uses strictly more space compare to its equivalent program in class I TRUE of FALSE ?
let R be the class of recursive program and l be the class of iterative program now consider below statement S S : every program in R uses strictly more space compare to ...
Rahul_Rathod_
339
views
Rahul_Rathod_
asked
Dec 28, 2018
Programming in C
data-structures
algorithms
programming-in-c
+
–
1
votes
1
answer
1760
c question
#include<stdio.h> main() { int j=0; int i; for( i=0;i<100;i++) { j=j++; } printf("%d",j); } why o/p is zero??
#include<stdio.h>main(){ int j=0; int i; for( i=0;i<100;i++) { j=j++; } printf("%d",j);}why o/p is zero??
Ajeet Singh
1.4k
views
Ajeet Singh
asked
Jun 24, 2018
Page:
« prev
1
...
83
84
85
86
87
88
89
90
91
92
93
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register