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
2
votes
1
answer
1861
o/p==?
Nishikant kumar
466
views
Nishikant kumar
asked
Nov 14, 2015
Programming in C
programming-in-c
+
–
2
votes
1
answer
1862
Please Confirm the answers
Match List-I with List-II and select the correct answer using the codes given below the list: List-I List-II A.Evaluation of infix 1. 1 operand stack B.Evaluation of postfix 2. 1 operator stack C.Evaluation of prefix 3. 1 operator queue CODES: A B C (a) 1 2 3 (b ... sum of elements on right side of root, then the value of $[(Rd)-(Ld)+Root]$ is _______. 1. D 2. 1289 3. 95
Match List-I with List-II and select the correct answer using the codes given below the list: List-IList-IIA.Evaluation of infix1. 1 operand stackB.Evaluation of postfix2...
Aditya
423
views
Aditya
asked
Nov 6, 2015
DS
programming
data-structures
+
–
2
votes
1
answer
1863
wiki-The stack usage for tail-recursive functions is bounded by a constant (i.e., is O(1)). plz explain how O(1)??
yes
290
views
yes
asked
Oct 31, 2015
2
votes
1
answer
1864
what is o/p
Sourabh Kumar 1
563
views
Sourabh Kumar 1
asked
Oct 30, 2015
Programming in C
programming-in-c
+
–
2
votes
1
answer
1865
evaluation of prefix expression takes O(n^2)....true?
admin
1.4k
views
admin
asked
Oct 19, 2015
DS
data-structures
stack
infix-prefix
time-complexity
+
–
2
votes
1
answer
1866
float
following statment printf("%f",9/5); prints answer is 2.0 can any one explain plzzzzz
following statmentprintf("%f",9/5);prints answer is 2.0 can any one explain plzzzzz
admin
2.0k
views
admin
asked
Oct 8, 2015
2
votes
1
answer
1867
What is the output of the program ?
int main(){ char *ptr = "gateexam"; printf("%c\n", *&*&*ptr); return 0; } (a) Compiler Error (b) Garbage Value (c) Runtime Error (d) g *please explain it.
int main(){ char *ptr = "gateexam"; printf("%c\n", *&*&*ptr); return 0; }(a) Compiler Error(b) Garbage Value(c) Runtime Error(d) g*please explain it.
IgnitorSandeep
488
views
IgnitorSandeep
asked
Oct 5, 2015
Programming in C
programming-in-c
+
–
2
votes
3
answers
1868
find first repeated element..
given an array of n element, what will be the time complexity to find 1st repeated element when array have more than one repeated elements??
given an array of n element, what will be the time complexity to find 1st repeated element when array have more than one repeated elements??
yes
1.0k
views
yes
asked
Oct 1, 2015
2
votes
1
answer
1869
What will be the output?
#include <stdio.h> char str1[100]; char *fun(char str[]) { static int i = 0; if (*str) { fun(str+1); str1[i] = *str; i++; } return str1; } int main() { char str[] = "GATE CS 2015 Mock Test"; printf(" ... kcoM 5102 SC ETAG C)Nothing is printed on screen D)Segmentation Fault i think answer should be option C.But the answer given as B.please explation how.
#include <stdio.h char str1[100]; char *fun(char str[]) { static int i = 0; if (*str) { fun(str+1); str1[i] = *str; i++; } return str1; } int main() { char str[] = "GATE ...
sdpshaw
1.8k
views
sdpshaw
asked
Sep 27, 2015
Programming in C
programming
programming-in-c
+
–
2
votes
5
answers
1870
ISRO2008-76
The minimum number of fields with each node of doubly linked list is 1 2 3 4
The minimum number of fields with each node of doubly linked list is1234
ajit
19.6k
views
ajit
asked
Sep 20, 2015
DS
isro2008
data-structures
linked-list
+
–
2
votes
3
answers
1871
ISRO2014-51
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language? Values of local variables Return address Heap area Information needed to access non local variables
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?Values of local variablesReturn addressHeap are...
ajit
3.7k
views
ajit
asked
Sep 20, 2015
Programming in C
isro2014
programming
activation-record
+
–
2
votes
3
answers
1872
The minimum number of temporary variables needed to swap the contents of two variables?
The minimum number of temporary variables needed to swap the contents of two variables is: (a) 1 (b) 2 (c) 3 (d) 0
The minimum number of temporary variables needed to swap the contents of two variables is:(a) 1 (b) 2(c) 3 (d) 0
goku
16.9k
views
goku
asked
Sep 14, 2015
Programming in C
programming
+
–
2
votes
5
answers
1873
what is the output of the following program code?
void myfunc(int X){ if(X > 0) myfunc( --X ); printf("%d", X); } int main(){ myfunc(5); return 0; } 0,0,1,2,3,4 4,3,2,1,0 4,3,2,1,0,0 0,1,2,3,4
void myfunc(int X){ if(X 0) myfunc( X ); printf("%d", X); } int main(){ myfunc(5); return 0; }0,0,1,2,3,44,3,2,1,04,3,2,1,0,00,1,2,3,4
debanjan sarkar
6.5k
views
debanjan sarkar
asked
Sep 3, 2015
Programming in C
programming-in-c
+
–
2
votes
1
answer
1874
How does concatenation of 2 circular linked lists takes constant time ?
I am not getting that when head pointer has no information regarding the tail pointer then how is it that circular linked list will have a constant time for its concatenation with another circular linked list , wouldn't it take same time if we perform concatenation on a single or double linked list .
I am not getting that when head pointer has no information regarding the tail pointer then how is it that circular linked list will have a constant time for its concatena...
radha gogia
2.9k
views
radha gogia
asked
Jul 22, 2015
Programming in C
data-structures
+
–
2
votes
2
answers
1875
Inorder traversal of BST if it contain two identical elements.
if two identical elements are present in BST then how inorder can give sorted array as output ? for ex. if 50,30,45,35,56,58,74,50,15 are inserted to make BST.
if two identical elements are present in BST then how inorder can give sorted array as output ?for ex. if 50,30,45,35,56,58,74,50,15 are inserted to make BST.
Neerajnandal
774
views
Neerajnandal
asked
Jul 21, 2015
DS
binary-tree
+
–
2
votes
1
answer
1876
Suppose we have numbers between 1 and 1000 in a binary search tree and we are searching for 360. Which of the following sequence could not be sequence of nodes examined?
1. 2, 252, 401, 398, 330, 344, 350, 3602. 924, 220, 911, 244, 898, 258, 362, 3603. 925, 202, 911, 240, 950, 245, 3604. 2, 399, 387, 219, 266, 382, 381, 278, 360
radha gogia
5.5k
views
radha gogia
asked
Jul 14, 2015
2
votes
2
answers
1877
Find output of following C program
main(){ int a[2][3][2]={ { {1,2},{9,8},{3,7} },{ {2,3},{1,4},{5,4} } }; printf("%d %d %d", a[1]-a[0],a[1][0]-a[0][0],a[1][0][0]-a[0][0][0]); } A) 3 3 1 B) 3 6 1 C) 6 6 1 D) 1 1 1 Plz explain
main(){int a [3] ={ { {1,2},{9,8},{3,7} },{ {2,3},{1,4},{5,4} } };printf("%d %d %d", a -a[0],a [0]-a[0][0],a [0][0]-a[0][0][0]);}A) 3 3 1B) 3 6 1C) 6 6 1D) 1 1 1Plz expla...
komal07
681
views
komal07
asked
Jul 7, 2015
2
votes
4
answers
1878
UGC NET CSE | December 2012 | Part 2 | Question: 25
Suppose that someone starts with a chain letter. Each person who receives the letter is asked to send it on to $4$ other people. Some people do this, while some do not send any letter. How many people have seen the letter, including the first person, if none ... out the letter? $122$ & $22$ $111$ & $11$ $133$ & $33$ $144$ & $44$
Suppose that someone starts with a chain letter. Each person who receives the letter is asked to send it on to $4$ other people. Some people do this, while some do not se...
Shimpy Goyal
6.7k
views
Shimpy Goyal
asked
Jun 23, 2015
DS
ugcnetcse-dec2012-paper2
tree
+
–
2
votes
2
answers
1879
Preorder to Inorder conversion for binary tree
how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example.
how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example.
anurag_am
6.0k
views
anurag_am
asked
Jun 15, 2015
DS
data-structures
+
–
2
votes
3
answers
1880
a binary search tree with n elements are constructed by randomly taking the elements one by one. What is the expected height of the tree
a binary search tree with n elements are constructed by randomly taking the elements one by one. What is the expected height of the tree
Sankaranarayanan P.N
747
views
Sankaranarayanan P.N
asked
Jun 4, 2015
Page:
« prev
1
...
89
90
91
92
93
94
95
96
97
98
99
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register