Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Recent questions in Programming and DS
1
vote
1
answer
5081
BST
certain file system stores records as per binary search tree principles.If the preorder traversal is 90,40,30,190,140,100,290.What is the expected number of comparisons when we randomly request one of the records?
shreshtha5
asked
in
DS
Nov 30, 2015
by
shreshtha5
570
views
binary-search-tree
numerical-answers
1
vote
3
answers
5082
C program
how it is compiler error int main() { extern int i; printf("%d ", i); { int i = 10; printf("%d ", i); } } (a) 0 10 (b) Compiler Error (c) 0 0 (d) 10 10 ans b
tiger
asked
in
Programming in C
Nov 29, 2015
by
tiger
5.1k
views
1
vote
2
answers
5083
C program
as i is initialized with 5 in main then how it becomes 0 please explain ? int main() { static int i=5; if(--i) { main(); printf("%d ",i); } } op = 0000
tiger
asked
in
Programming in C
Nov 29, 2015
by
tiger
405
views
2
votes
1
answer
5084
c program
how statement "printf("%s ", cpp[-1][-1]+1);" works plz explain #include <stdio.h> char *c[] = {"GatsQuiz", "MCQ", "TEST", "QUIZ"}; char **cp[] = {c+3, c+2, c+1, c}; char ***cpp = cp; int main() { printf( ... 3); printf("%s ", *cpp[-2]+3); printf("%s ", cpp[-1][-1]+1); return 0; } o/p TEST sQuiz Z CQ
tiger
asked
in
Programming in C
Nov 28, 2015
by
tiger
774
views
programming-in-c
1
vote
1
answer
5085
c program
what function fun() does here #include <string.h> #include <stdio.h> #include <stdlib.h> void fun(char** str_ref) { str_ref++; } int main() { char *str = (void *)malloc(100*sizeof(char)); strcpy(str, "gate2016"); fun(&str); puts(str); free(str); return 0; } op gate2016
tiger
asked
in
Programming in C
Nov 28, 2015
by
tiger
352
views
2
votes
1
answer
5086
C program
Explain the array representation used here #include <stdio.h> int main() { int a[][3] = {1, 2, 3, 4, 5, 6}; int (*ptr)[3] = a; printf("%d %d ", (*ptr)[1], (*ptr)[2]); ++ptr; printf("%d %d\n", (*ptr)[1], (*ptr)[2]); return 0; } op=2 3 5 6
tiger
asked
in
Programming in C
Nov 28, 2015
by
tiger
422
views
1
vote
1
answer
5087
pointer array
What it means ? int (*p)[R][C];
tiger
asked
in
Programming in C
Nov 27, 2015
by
tiger
518
views
3
votes
0
answers
5088
Total running time of 'm' access operation in a Splay tree .. [GATEFORUM-TEST-DSA]
Vinay Yadav
asked
in
DS
Nov 26, 2015
by
Vinay Yadav
543
views
data-structures
tree
4
votes
2
answers
5089
Program
Explain the line : t = (p += sizeof(int))[-1]; in following program : #include <stdio.h> void f(char**); int main() { char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(argv); return 0; } void f(char **p) { char *t; t = (p += sizeof(int))[-1]; printf("%s\n", t); }
tiger
asked
in
Programming in C
Nov 26, 2015
by
tiger
3.6k
views
programming-in-c
2
votes
1
answer
5090
Time complexity
What is time complexity to evaluate prefix and postfix expression ? as per me it should be O(n) as atmost 2 pop operation perform and 1 push operation
saurav04
asked
in
DS
Nov 25, 2015
by
saurav04
1.6k
views
2
votes
2
answers
5091
C prgram
x– = y+1; does the same as: (a) x= x –y +1 (b) x= – x –y – 1 (c) x= –x + y +1 (d) x= x – y – 1 is ans is a ? given d
tiger
asked
in
Programming in C
Nov 25, 2015
by
tiger
7.1k
views
programming-in-c
programming
1
vote
0
answers
5092
c program
Explain how to evaluate it how to evaluate recursion within loop Consider the following C function: int fun (int n) { int x=1, k; if (n= =1) return x; for (k=1; k < n; ++k) x = x + fun(k) * fun(n – k); } The return value of fun(5) is __________. (a) 0 (b) 26 (c) 51 (d) 71
closed
tiger
asked
in
Programming in C
Nov 25, 2015
by
tiger
285
views
1
vote
1
answer
5093
C programming
what does the following c expression do? x = x & (x-1)
tiger
asked
in
Programming in C
Nov 25, 2015
by
tiger
2.2k
views
1
vote
2
answers
5094
Output
#include ‬<stdio.h> int main(){ int i = 4; i = printf(" %d ", ++i) + printf(" %d ", i--); printf(" %d ", i); }
Sandip Shaw
asked
in
Programming in C
Nov 25, 2015
by
Sandip Shaw
698
views
programming-in-c
programming
4
votes
1
answer
5095
NUMBER OF HEAPS POSSIBLE
# heaps Min or Max_ consider any! Give recurrence relation / math expression For What is the number of min heaps possible with $n$ distinct elements? What is the number of min heaps possible with $n$ elements on which $k$ elements are repeated $t$ times where $t=0$ to infinite (rather considering infinite consider some max value (countable))?
Ravi Raaja
asked
in
DS
Nov 24, 2015
by
Ravi Raaja
3.0k
views
combinatory
binary-heap
3
votes
2
answers
5096
What is ouput will be printed in array , if following code performed
Main () { int a [3] [4] = $\begin{pmatrix} 1&2&3&4 \\ 5&6&7&8 \\ 9&10&11&12 \\ \end{pmatrix}$ printf ("\n% u% u% u", a[0]+1, * (a[0] + 1), *(*(a + 0)+1)); } What is the output of the above program? Assume array begin at address 10.
sabir
asked
in
Programming in C
Nov 24, 2015
by
sabir
918
views
array
pointers
8
votes
4
answers
5097
ISICAL MTech 2014 CS
How many asterisks $(*)$ in terms of $k$ will be printed by the following C function, when called as $\text{count}(m)$ where $m = 3^k \ ?$ Justify your answer. Assume that $4$ bytes are used to store an integer in C and $k$ is such that $3^k$ can be stored in $4$ bytes. void count(int n){ printf("*"); if(n>1){ count(n/3); count(n/3); count(n/3); } }
Vikranth Inti
asked
in
Programming in C
Nov 23, 2015
by
Vikranth Inti
1.6k
views
programming-in-c
recursion
isi2014
42
votes
4
answers
5098
TIFR CSE 2014 | Part B | Question: 19
Consider the following tree with $13$ nodes. Suppose the nodes of the tree are randomly assigned distinct labels from $\left\{1, 2,\ldots,13\right\}$, each permutation being equally likely. What is the probability that the labels form a min-heap (i.e., every node receives the ... $\frac{2}{13}$ $\frac{1}{2^{13}}$
makhdoom ghaya
asked
in
DS
Nov 20, 2015
by
makhdoom ghaya
5.6k
views
tifr2014
binary-heap
0
votes
0
answers
5099
ans please
We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree? A) 0 B) 1 C) n! D) (1/(n+1)).2nCn
closed
Ankit Solanki
asked
in
Programming in C
Nov 20, 2015
by
Ankit Solanki
557
views
10
votes
2
answers
5100
TIFR CSE 2014 | Part B | Question: 1
Let $T$ be a rooted binary tree whose vertices are labelled with symbols $a, b, c, d, e, f, g, h, i, j, k$. Suppose the in-order (visit left subtree, visit root, visit right subtree) and post-order (visit left subtree, visit right ... How many leaves does the tree have? THREE. FOUR. FIVE. SIX. Cannot be determined uniquely from the given information.
makhdoom ghaya
asked
in
DS
Nov 19, 2015
by
makhdoom ghaya
2.2k
views
tifr2014
binary-tree
data-structures
easy
Page:
« prev
1
...
250
251
252
253
254
255
256
257
258
259
260
...
309
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Programming
(4.1k)
DS
(2.0k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions in Programming and DS
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow