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
5261
Code for Merging for an array
There are two arrays A and B having N/2 elements. The elements are stored in ascending order already . Merge these arrays and create a new array C of size N . A code fragement is given. fill the missing part in it. the index variables have initial value as zero if(...........) C[] =.......... ; else C[]=...........;
There are two arrays A and B having N/2 elements. The elements are stored in ascending order already . Merge these arrays and create a new array C of size N . A code fra...
Sankaranarayanan P.N
318
views
Sankaranarayanan P.N
asked
Jun 4, 2015
0
votes
1
answer
5262
Code for stack push
A stack is implemented as an array Stack of size N. TOS points to the current top of the stack . The initial value of TOS is -1. The code for push operation for a value in stack is given. fill EMPTY BOX 1 and EMPTY BOX 2 if( EMPTY BOX 1) Stack[EMPTY BOX 2] = value;
A stack is implemented as an array Stack of size N. TOS points to the current top of the stack . The initial value of TOS is -1. The code for push operation for a value i...
Sankaranarayanan P.N
308
views
Sankaranarayanan P.N
asked
Jun 4, 2015
2
votes
3
answers
5263
What is the output ? int x=8; x-=--x-x--; printf("%d",x);
confused_luck
3.3k
views
confused_luck
asked
Jun 2, 2015
Programming in C
programming
+
–
0
votes
2
answers
5264
Pointers
Now I suppose if i have a statement like *P++ then it is broken down as first (P++) and then *p (because both are unary operator and associtivity is right to left ) and if we have statement like a=*p++ then it is broken down into a=*p and then p is incremented !! Am i right ?
Now I suppose if i have a statement like *P++ then it is broken down as first (P++) and then *p (because both are unary operator and associtivity is right to left ) and ...
spriti1991
670
views
spriti1991
asked
Jun 1, 2015
Programming in C
pointers
programming-in-c
+
–
0
votes
1
answer
5265
what is the size of stack we need in tail recursion ???
_xor_
438
views
_xor_
asked
May 29, 2015
1
votes
2
answers
5266
simple uniform hashing
why in open address hash table with load factor α=n/m<1, the expected number of probes in an unsuccessful search is at most 1/(1-α) assuming uniform hashing ?
why in open address hash table with load factor α=n/m<1, the expected number of probes in an unsuccessful search is at most 1/(1-α) assuming uniform hashing ?
anurag_am
1.7k
views
anurag_am
asked
May 29, 2015
DS
hashing
+
–
0
votes
1
answer
5267
simple uniform hashing
why in a hash table in which collisions are resolved by a chaining , a successful search takes average- case time ⊖(1+load factor) ,under the assumption of simple uniform hashing ?
why in a hash table in which collisions are resolved by a chaining , a successful search takes average- case time ⊖(1+load factor) ,under the assumption of simple unifo...
anurag_am
1.3k
views
anurag_am
asked
May 27, 2015
DS
hashing
chaining
+
–
0
votes
2
answers
5268
please provide proper explanation..!
what is the output of pro..?? #ifndef include<stdio.h> void main() { #endif printf("%d",900*90/90); }
what is the output of pro..??#ifndef include<stdio.h>void main(){#endifprintf("%d",900*90/90);}
focus _GATE
395
views
focus _GATE
asked
May 25, 2015
2
votes
2
answers
5269
hashing
In a separate chaining hash table with load factor =0.8, what is the average length of a list ? a) 0.8 b) 1.0 c) 1.25 d) there is not enough information e) there is enough information, but none of the above are correct
In a separate chaining hash table with load factor =0.8, what is the average length of a list ?a) 0.8 b) 1.0 c) 1.25d) there is not enough informatione) there is enough i...
anurag_am
2.0k
views
anurag_am
asked
May 23, 2015
DS
hashing
+
–
2
votes
2
answers
5270
linear probing
How are elements deleted in linear probing ? (a) Deletion is not allowed (b) they are changed to zero (c) they are marked deleted (d) unchecked deallocation (e) None of the above
How are elements deleted in linear probing ?(a) Deletion is not allowed(b) they are changed to zero(c) they are marked deleted(d) unchecked deallocation(e) None of the ab...
anurag_am
939
views
anurag_am
asked
May 23, 2015
DS
hashing
+
–
0
votes
1
answer
5271
Is it correct?
void f (queue Q) { int i ; if (!isEmpty(Q)) { i = delete(Q); f(Q); push(s, i); } }
void f (queue Q) { int i ; if (!isEmpty(Q)) { i = delete(Q); f(Q); push(s, i); } }
Anu
680
views
Anu
asked
May 21, 2015
1
votes
2
answers
5272
C-programming
On running this code I am getting illegal initialization ..please explain... Also in following link ans is given as d)....(Q-9) http://gpl4you.com/viewquestype.php?type=3&company=VIRTUSA
On running this code I am getting illegal initialization ..please explain...Also in following link ans is given as d)....(Q-9)http://gpl4you.com/viewquestype.php?type=3&c...
komal07
975
views
komal07
asked
May 12, 2015
0
votes
1
answer
5273
Given a string,in which anything except digits are treated as separators
Given a string,in which anything except digits are treated as separators, and between each set of separators,there is some substring. count number of separators and substrings and return it with only 1 return statement
Given a string,in which anything except digits are treated as separators, and between each set of separators,there is some substring. count number of separators and subst...
ajit
496
views
ajit
asked
May 12, 2015
Programming in C
programming-in-c
+
–
0
votes
1
answer
5274
pint= (int*)p; what is use of this statement.
Rahul Kumar 1
885
views
Rahul Kumar 1
asked
May 8, 2015
0
votes
2
answers
5275
which statement is true about doubly linked list?
Gunjan Rathore
9.1k
views
Gunjan Rathore
asked
May 4, 2015
Programming in C
linked-list
+
–
0
votes
1
answer
5276
pointer arithmatic
#include <stdio.h> int main(void) { static char s[25]="TheCocaine Man"; int i=0; char ch; ch=s[++i]; printf("%c",ch); ch=s[i++]; printf("%c \n",ch); ch=i++[s]; printf("%c\n",ch); ch=++i[s]; printf("%c ",ch); return 0; } how last ch print D?is ++i[s] incremet index or value?
#include <stdio.h>int main(void) { static char s[25]="TheCocaine Man"; int i=0; char ch; ch=s[++i]; printf("%c",ch); ch=s[i++]; printf("%c \n"...
akash
899
views
akash
asked
Apr 30, 2015
3
votes
2
answers
5277
c programming
What will be output of following program? #include<stdio.h> int main(){ int a = 320; char *ptr; ptr =( char *)&a; printf("%d ",*ptr); return 0; } (A) 2 (B) 320 (C) 64 (D) Compilation error (E) None of above
What will be output of following program?#include<stdio.h>int main(){ int a = 320; char *ptr; ptr =( char *)&a; printf("%d ",*ptr); return 0;}(A) 2(B) 320(C) 64...
komal07
2.1k
views
komal07
asked
Apr 30, 2015
0
votes
2
answers
5278
Give an algorithm to finding duplicate parenthesis in a expression ?
suppose expression is like : ((a+b)+((c+d))), so how to find duplicate parenthesis in the given expression ?
suppose expression is like : ((a+b)+((c+d))), so how to find duplicate parenthesis in the given expression ?
anurag_am
1.3k
views
anurag_am
asked
Apr 29, 2015
DS
data-structures
stack
descriptive
+
–
0
votes
1
answer
5279
Optimal binary search tree
Given the following table of data what are the minimum expected no.of comparisons required for an Optimal i 0 1 2 3 4 Pi 3/16 3/16 1/16 1/16 Qi 2/16 3/16 1/16 1/16 1/16 BST that can be constructed with the given data
Given the following table of data what are the minimum expected no.of comparisons required for an Optimali01234Pi 3/163/161/161/16Qi2/163/161/161/161/16BST that can be co...
supraja
4.3k
views
supraja
asked
Apr 28, 2015
DS
data-structures
binary-search-tree
numerical-answers
+
–
0
votes
3
answers
5280
what is the starting address of A[49] ?
A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The starting address of A[49] is A. 1167 B. 1164 C. 1264 D. ... it takes three memory words.is this correct answer?Does each memory word represents a single character? or am i doing something wrong?
A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The startin...
GATE_2016
4.1k
views
GATE_2016
asked
Apr 22, 2015
Programming in C
array
programming
+
–
Page:
« prev
1
...
259
260
261
262
263
264
265
266
267
268
269
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register