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
2
answers
1741
self doubt
i am getting 4,3,4,3,8,2 is it right?????
i am getting 4,3,4,3,8,2 is it right?????
vijju532
692
views
vijju532
asked
Jul 5, 2018
Programming in C
algorithms
data-structures
+
–
1
votes
1
answer
1742
Asymptotic time complexity to add a node at the end of singly linked list.
What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list? (a) O(1) (b) O(n) (c) θ (n) (d) θ (1) Confused between option (b) and (c) .
What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?(a) O(1) (b...
arya_stark
20.9k
views
arya_stark
asked
Jul 4, 2018
DS
data-structures
linked-list
time-complexity
+
–
1
votes
1
answer
1743
Entriies in s stack are "ordered".
Entries in a stack are "ordered". What is the meaning of this statement?
Entries in a stack are "ordered". What is the meaning of this statement?
arya_stark
2.8k
views
arya_stark
asked
Jul 4, 2018
DS
data-structures
stack
+
–
2
votes
1
answer
1744
Tree , Preorder , depth-first order , breadth-first order
Preorder is same as : a) depth-first order b) breadth-first search c) topological order d) linear order
Preorder is same as :a) depth-first order b) breadth-first searchc) topological order d) linear order
arya_stark
7.1k
views
arya_stark
asked
Jul 4, 2018
DS
data-structures
tree-traversal
+
–
0
votes
1
answer
1745
self doubt
what is the time complexity to construct binary search tree when preorder and postorder of tree given? answer given is O(n) but i think it will be nlogn...becz from given postorder or preorder we need to find in order by sortingin nlogn tum so I think overalltime complexity will be nlogn ..???
what is the time complexity to construct binary search tree when preorder and postorder of tree given?answer given is O(n)but i think it will be nlogn...becz from given p...
eyeamgj
774
views
eyeamgj
asked
Jul 3, 2018
DS
data-structures
binary-search-tree
time-complexity
+
–
1
votes
1
answer
1746
Union Output
What will be the output of the program ? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0]=3; u.ch[1]=2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; } A. 3, 2, 515 B. 515, 2, 3 C. 3, 2, 5 D. 515, 515, 4 Please Explain how to do such Questions On Union...
What will be the output of the program ?#include<stdio.h int main() { union a { int i; char ch ; }; union a u; u.ch[0]=3; u.ch =2; printf("%d, %d, %d\n", u.ch[0], u.ch , ...
Na462
3.4k
views
Na462
asked
Jul 3, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
1747
Structure Output
What is the Output of Following Program Snippet ? #include <stdio.h> struct Key{ int X; char P; }; int main() { struct Key Values[] = {10,'A',20,'B',30,'C',40,'D'}; printf("%d",sizeof(Values)); } Explain your Answer ..
What is the Output of Following Program Snippet ?#include <stdio.h struct Key{ int X; char P; };int main(){ struct Key Values[] = {10,'A',20,'B',3...
Na462
257
views
Na462
asked
Jul 3, 2018
Programming in C
programming-in-c
+
–
0
votes
0
answers
1748
C programming
What is the value of p and q at the end? #include<stdio.h> int main() { int n=1024; int p=0,q=0; int i,j; for( i = 1;i<=n;i=2*i) p=p+5; for(j = 1;j<=p;j=2*j) q=q+7; printf(" %d\n %d\n",p,q); } Please explain briefly.
What is the value of p and q at the end?#include<stdio.h>int main(){ int n=1024; int p=0,q=0; int i,j; for( i = 1;i<=n;i=2*i) p=p+5; for(j = 1;j<=p;...
Siddharth Bhardawaj
331
views
Siddharth Bhardawaj
asked
Jul 1, 2018
1
votes
2
answers
1749
Yashavant kanetkar understanding pointer in C, Chepter 1, Question 13.
13. What does the error "Null Pointer Assignment" mean and what causes this error?
13. What does the error "Null Pointer Assignment" mean and what causes this error?
ermp888
501
views
ermp888
asked
Jul 1, 2018
0
votes
1
answer
1750
Yashavant kanetkar understanding pointer in C, Chepter 1, Question 6.
6. Would the following program compile? main( ) { int a = 10, *j; void *k; j = k = &a; j++ ; k++; printf ("\n %u %u", j, k ) ; } Please explain above program with some examples..
6. Would the following program compile?main( ) { int a = 10, *j; void *k; j = k = &a; j++ ; k++; printf ("\n %u %u", j, k ) ; }Please explain above program with some exam...
ermp888
642
views
ermp888
asked
Jun 30, 2018
Programming in C
programming-in-c
+
–
1
votes
1
answer
1751
Yashavant kanetkar understanding pointer in C, Chepter 1, Question 5.
(5) Would the following program give a compilation error or warning? main() { float i = 10, *j; void *k; k=&i; j= k; printf("\n%f", *j); }
(5) Would the following program give a compilation error or warning?main() { float i = 10, *j; void *k; k=&i; j= k; printf("\n%f", *j); }
ermp888
809
views
ermp888
asked
Jun 30, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
1752
Binary Tree
Can a binary tree or BST can be constructed with dynamic programming? Can it be constructed through greedy method? Plz give some algorithm and explain
Can a binary tree or BST can be constructed with dynamic programming? Can it be constructed through greedy method?Plz give some algorithm and explain
srestha
484
views
srestha
asked
Jun 30, 2018
DS
data-structures
binary-search-tree
+
–
0
votes
1
answer
1753
self doubt
The number of different insertion sequences on numbers {1, 14, 26, 44, 60, 71} on an initially empty hash table H of size 6 and a hash function x%6 with linear probing scheme for collision resolution such that the end hash table should look like 60, 1, 14, 26, ... solution i am getting 3 keys to be inserted in to 2nd part now how to find the places in last place this is confusion ???
The number of different insertion sequences on numbers {1, 14, 26, 44, 60, 71} on an initially empty hash table H of size 6 and a hash function x%6 with linear probing sc...
eyeamgj
242
views
eyeamgj
asked
Jun 30, 2018
0
votes
1
answer
1754
Test Series
int main(){ fun(4); return 0; } int fun(int n){ if(n>0){ int i=1; for(;i<3;i++){ fun(n-i); fun(n-i-1); printf(“Hello”); } } return 0; } The number of times “Hello” will be printed _______
int main(){ fun(4);return 0;}int fun(int n){ if(n>0){ int i=1; for(;i<3;i++){ ...
Brij gopal Dixit 1
261
views
Brij gopal Dixit 1
asked
Jun 29, 2018
0
votes
0
answers
1755
Ace Question 3
Na462
233
views
Na462
asked
Jun 29, 2018
Programming in C
programming
+
–
0
votes
2
answers
1756
Ace Test Series: Data Structures - Circular Linked List
Na462
882
views
Na462
asked
Jun 29, 2018
DS
ace-test-series
data-structures
linked-list
+
–
0
votes
1
answer
1757
Ace Test Series: Programming & DS - Array
According to me Option D. Because it should be an error because *("INDIA" + 2 ) = 'D' and we are doing 'D' = 'I' which is not valid so Error ??? But answer is C
According to me Option D.Because it should be an error because *("INDIA" + 2 ) = 'D' and we are doing 'D' = 'I' which is not valid so Error ???But answer is C
Na462
581
views
Na462
asked
Jun 29, 2018
Programming in C
ace-test-series
data-structures
array
+
–
1
votes
1
answer
1758
#C Recursion Question (A variance of Gate 2018) Question
Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { if (y !=2 ) { if (x !=1) { print("*"); Count (x/2, y); } else { y=y-1; Count (1024, y); } } } The number of times ... ================================= My answer is 10220 and I just need someone to verify if it's correct.
Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { if (y !=2 ) { if (x !=1) { ...
iarnav
799
views
iarnav
asked
Jun 28, 2018
Programming in C
programming-in-c
numerical-answers
recursion
+
–
0
votes
2
answers
1759
self doubt
how does AVL tree requires o(logn) for all the operation i.e search insert and delete while other tree (bst,binary) requires o(n) is it due to balancing factor that avl tree computes operation in logn times am i right ???
how does AVL tree requires o(logn) for all the operation i.e search insert and deletewhile other tree (bst,binary) requires o(n) is it due to balancing factor that avl tr...
vijju532
450
views
vijju532
asked
Jun 28, 2018
DS
data-structures
avl-tree
time-complexity
+
–
–1
votes
0
answers
1760
Progamming doubt
If two same name variable is created in two different C programs and if that two program run simultaneously then the address of that same name variable in both the programs returns same.But if we add 100 with that variable and initial value of that variable is ... two programs are same then in both the program the value of that variable should be 100. Plss help and clear my doubt
If two same name variable is created in two different C programs and if that two program run simultaneously then the address of that same name variable in both the progra...
Avik Chowdhury
187
views
Avik Chowdhury
asked
Jun 28, 2018
Programming in C
programming-in-c
+
–
Page:
« prev
1
...
83
84
85
86
87
88
89
90
91
92
93
...
309
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register