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.
Recent activity in Programming and DS
58
votes
3
answers
1
GATE CSE 2016 Set 1 | Question: 15
Consider the following C program. # include <stdio.h> void mystery (int *ptra, int *ptrb) { int *temp; temp = ptrb; ptrb =ptra; ptra = temp; } int main () { int a = 2016, b=0, c= 4, d = 42; mystery (&a, &b); if (a < c) mystery (&c, &a); mystery (&a, &d); printf("%d\n", a); } The output of the program is _________.
cprdereddyy
commented
in
Programming in C
4 days
ago
by
cprdereddyy
17.8k
views
gatecse-2016-set1
programming-in-c
easy
numerical-answers
parameter-passing
71
votes
9
answers
2
GATE CSE 2015 Set 2 | Question: 31
A Young tableau is a $2D$ array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with $\infty$, and hence there cannot be any entry to the right of, or below a $\infty$. The following Young tableau ... The minimum number of entries (other than $1$) to be shifted, to remove $1$ from the given Young tableau is _____.
cprdereddyy
commented
in
DS
4 days
ago
by
cprdereddyy
12.9k
views
gatecse-2015-set2
databases
array
normal
numerical-answers
0
votes
0
answers
3
GATE CSE SET-1 2024
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
RahulVerma3
asked
in
Programming in C
6 days
ago
by
RahulVerma3
28
views
programming-in-c
programming
100
votes
6
answers
4
GATE IT 2006 | Question: 49
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, " ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
maheshv21
commented
in
Programming in C
6 days
ago
by
maheshv21
26.8k
views
gateit-2006
programming
programming-in-c
normal
structure
130
votes
3
answers
5
GATE CSE 2014 Set 2 | Question: 11
Suppose $n$ and $p$ are unsigned int variables in a C program. We wish to set $p$ to $^nC_3$. If $n$ is large, which one of the following statements is most likely to set $p$ correctly? $p = n * (n-1) * (n-2) / 6;$ $p = n * (n-1) / 2 * (n-2) / 3;$ $p = n * (n-1) / 3 * (n-2) / 2;$ $p = n * (n-1) * (n-2) / 6.0;$
cprdereddyy
commented
in
Programming in C
6 days
ago
by
cprdereddyy
15.3k
views
gatecse-2014-set2
programming
programming-in-c
normal
11
votes
3
answers
6
GATE CSE 2022 | Question: 11
What is printed by the following $\text{ANSI C}$ program? #include<stdio.h> int main(int argc, char *argv[]) { int x = 1, z[2] = {10, 11}; int *p = NULL; p = &x; *p = 10; p = &z[1]; *(&z[0] + 1) += 3; printf(“%d, %d, %d\n”, x, z[0], z[1]); return 0; } $1, 10, 11$ $1, 10, 14$ $10, 14, 11$ $10, 10, 14$
shihabkamel
commented
in
Programming in C
6 days
ago
by
shihabkamel
5.7k
views
gatecse-2022
programming
programming-in-c
pointers
output
1-mark
6
votes
3
answers
7
ISRO2017-16
Given two statements Insertion of an element should be done at the last node of the circular list Deletion of an element should be done at the last node of the circular list Both are true Both are false First is false and second is true None of the above
Sanjana Chamarthy
answered
in
DS
Mar 20
by
Sanjana Chamarthy
10.4k
views
isro2017
data-structures
linked-list
bad-question
0
votes
2
answers
8
GATE DS&AI 2024 | Question: 31
Consider the following Python function: def $\operatorname{fun}(D, s 1, s 2)$ : if $\mathrm{s} 1<\mathrm{s} 2$ ... both inclusive. It swaps the elements in $\mathrm{D}$ at indices $\mathrm{s} 1$ and $\mathrm{s} 2$, and leaves the remaining elements unchanged.
makhdoom ghaya
edited
in
Programming in Python
Mar 19
by
makhdoom ghaya
848
views
gate-ds-ai-2024
programming
0
votes
1
answer
9
GATE DS&AI 2024 | Question: 28
Consider the following Python code: def count(child_dict, i): if i not in child_dict.keys(): return 1 ans $=1$ for $j$ in child_dict[i]: ans $+=$ count (child_dict, j) return ans child_dict $=$ dict () child_dict $[0]=[1,2]$ child_dict $[1]=[3,4,5]$ ... $)$ ) Which ONE of the following is the output of this code? $6$ $1$ $8$ $9$
makhdoom ghaya
edited
in
Programming in Python
Mar 19
by
makhdoom ghaya
781
views
gate-ds-ai-2024
programming
0
votes
1
answer
10
GATE DS&AI 2024 | Question: 22
The fundamental operations in a double-ended queue $D$ are: insertFirst (e) - Insert a new element $e$ at the beginning of $D$. insertLast (e) - Insert a new element $e$ at the end of D. removeFirst () - Remove and return the first element of $D$. removeLast () ... $\mathbf{a} \leftarrow$ removeLast () The value of $\mathbf{a}$ is $\_\_\_\_\_\_\_\_$.
makhdoom ghaya
edited
in
DS
Mar 19
by
makhdoom ghaya
658
views
gate-ds-ai-2024
numerical-answers
data-structures
37
votes
11
answers
11
GATE CSE 2021 Set 2 | Question: 10
Consider the following $\text{ANSI C}$ program. #include <stdio.h> int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) { for (j=0; j<5; j++) { arr[i][j] = 10 * i + j; } } printf(“%d”, *(arr[1]+9)); return 0; } What is the output of the above program? $14$ $20$ $24$ $30$
Subham640
answered
in
Programming in C
Mar 18
by
Subham640
29.8k
views
gatecse-2021-set2
programming-in-c
array
output
1-mark
0
votes
1
answer
12
GATE DS&AI 2024 | Question: 11
Consider performing uniform hashing on an open address hash table with load factor $\alpha=\frac{n}{m}<1$, where $n$ elements are stored in the table with $m$ slots. The expected number of probes in an unsuccessful search is at most $\frac{1}{1-\alpha}$. Inserting ... $\frac{1}{1-\alpha}$ $1+\frac{\alpha}{2}$ $\frac{1}{1+\alpha}$
makhdoom ghaya
edited
in
DS
Mar 17
by
makhdoom ghaya
682
views
gate-ds-ai-2024
data-structures
hashing
uniform-hashing
46
votes
8
answers
13
GATE CSE 2015 Set 3 | Question: 7
Consider the following C program segment. # include <stdio.h> int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); } What will be printed by the program? $12$ $120400$ $1204$ $1034$
Subham640
answered
in
Programming in C
Mar 17
by
Subham640
15.8k
views
gatecse-2015-set3
programming
programming-in-c
normal
array
42
votes
9
answers
14
GATE CSE 2000 | Question: 1.16
Aliasing in the context of programming languages refers to multiple variables having the same memory location multiple variables having the same value multiple variables having the same identifier multiple uses of the same variable
Subham640
commented
in
Programming in C
Mar 17
by
Subham640
22.1k
views
gatecse-2000
programming
easy
aliasing
0
votes
0
answers
15
GATE 2024 CSE1
I have a question that can we use command line arguments without main function arguments? int main(int argc, char **argv){ }
RahulVerma3
asked
in
Programming in C
Mar 16
by
RahulVerma3
94
views
gatecse2024-set1
programming-in-c
1
vote
1
answer
16
DRDO CSE 2022 Paper 1 | Question: 28
If the maximum height of a binary tree is $\mathrm{N},$ then how many number of nodes will there be?
Ajay12345
answered
in
DS
Mar 16
by
Ajay12345
236
views
drdocse-2022-paper1
data-structures
binary-tree
4-marks
descriptive
2
votes
2
answers
17
GATE CSE 2024 | Set 2 | Question: 26
What is the output of the following $\text{C}$ program? #include <stdio.h> int main() { double $a[2]=\{20.0,25.0\},{ }^{*} \mathrm{p},{ }^{*} \mathrm{q}$; $\mathrm{p}=\mathrm{a} ;$ $q=p+1 ;$ printf("%d,%d", (int) $(q-p),($ int $\left.)\left({ }^{*} q-{ }^{*} p\right)\right)$; return $0$ ; } $4,8$ $1,5$ $8,5$ $1,8$
saurabh0709
comment edited
in
Programming in C
Mar 15
by
saurabh0709
2.5k
views
gatecse2024-set2
programming
programming-in-c
3
votes
2
answers
18
GATE CSE 2024 | Set 2 | Question: 3
Consider the following $\text{C}$ program. Assume parameters to a function are evaluated from right to left. #include <stdio.h> int g( int p) { printf("%d", p); return p; } int h(i nt q) { printf("%d", q) ... one of the following options is the CORRECT output of the above $\text{C}$ program? $20101020$ $10202010$ $20102010$ $10201020$
saurabh0709
commented
in
Programming in C
Mar 14
by
saurabh0709
3.2k
views
gatecse2024-set2
programming
programming-in-c
0
votes
1
answer
19
C program
Predict the output of the following program. Void func (int n) { if (n > o) { func (n – 2); Print f ("% d", n – 1); Fun (n – 2); } } if 10 is passed as literal value : (1) 975921 (2) 951351 (3) 1315131713151317 (4) 131513713151319131513171315131 Your Answer: 3 Correct Answer: 4 Status: incorrect
teja1521
commented
in
Programming in C
Mar 13
by
teja1521
184
views
0
votes
1
answer
20
Gate 2017 Set 1 minimum Comparisons
Consider an array A of size 31 consisting of 0's followed by number of 1's. In order to find the smallest index i such that A[i]=1 minimum number of comparisons required in worst case by optimal algorithm?
teja1521
answered
in
Programming in C
Mar 11
by
teja1521
202
views
numerical-answers
algorithms
2
votes
2
answers
21
let x be an array of integer which of the following can not be present in the LHS of an assignment statement
teja1521
answer reshown
in
Programming in C
Mar 11
by
teja1521
2.6k
views
0
votes
2
answers
22
difference between if(a=0) and if(a=non zero)
what is the differernce between if (a=0) and if (a= -7) or any other non-zero number e.g what will be the out put of following program a)if ( a=0) printf(""a is zero ") else printf("a is not zero") and if we replace 0 by some +ve or -ve number then
teja1521
commented
in
Programming in C
Mar 11
by
teja1521
2.1k
views
3
votes
2
answers
23
UGC NET CSE | June 2005 | Part 2 | Question: 15
Main() { char *str="abcde"; printf("%c",*str); printf("%c",*str++); printf("%c",*(str++)); printf("%s",str); } The output of the above $‘C’$ code will be : $\text{a a c b c d e}$ $\text{a a c c c d e}$ $\text{a a b c d e}$ None of these
ajayraho
commented
in
Programming in C
Mar 11
by
ajayraho
1.1k
views
ugcnetcse-june2005-paper2
programming-in-c
variable-scope
1
vote
3
answers
24
UGC NET CSE | December 2004 | Part 2 | Question: 22
Suppose we are implementing quadratic probing with a Hash function, Hash $(y)=X$ mode $100$. If an element with key $4594$ is inserted and the first three locations attempted are already occupied, then the next cell that will be tried is : $2$ $3$ $9$ $97$
ajayraho
answered
in
DS
Mar 11
by
ajayraho
1.6k
views
ugcnetcse-dec2004-paper2
1
vote
1
answer
25
DRDO CSE 2022 Paper 1 | Question: 26 (b)
Provide the correct data structures for the following: Asynchronous data transfer and accessing shared resource involve _________.
mishraamulya
answered
in
DS
Mar 10
by
mishraamulya
323
views
drdocse-2022-paper1
data-structures
1-mark
fill-in-the-blanks
2
votes
3
answers
26
program output
char *c[] = {"GeksQuiz", "MCQ", "TEST", "QUIZ"}; char **cp[] = {c+3, c+2, c+1, c}; char ***cpp = cp; int main() { printf("%s ", **++cpp); printf("%s ", *--*++cpp+3); printf("%s ", *cpp[-2]+3); printf("%s ", cpp[-1][-1]+1); return 0; }
teja1521
commented
in
Programming in C
Mar 10
by
teja1521
4.2k
views
programming-in-c
pointers
29
votes
4
answers
27
GATE IT 2008 | Question: 49
What is the output printed by the following C code? # include <stdio.h> int main () { char a [6] = "world"; int i, j; for (i = 0, j = 5; i < j; a [i++] = a [j--]); printf ("%s\n", a); } dlrow Null string dlrld worow
Srken
commented
in
Programming in C
Mar 10
by
Srken
9.4k
views
gateit-2008
programming
programming-in-c
normal
array
35
votes
2
answers
28
GATE CSE 2020 | Question: 22
Consider the following C program. #include <stdio.h> int main () { int a[4] [5] = {{1, 2, 3, 4, 5}, {6, 7,8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17,18, 19, 20}}; printf(“%d\n”, *(*(a+**a+2)+3)); return(0); } The output of the program is _______.
Srken
commented
in
Programming in C
Mar 10
by
Srken
23.2k
views
gatecse-2020
numerical-answers
programming-in-c
array
1-mark
43
votes
3
answers
29
GATE CSE 2015 Set 3 | Question: 30
Consider the following two C code segments. $Y$ and $X$ are one and two dimensional arrays of size $n$ and $ n \times n$ respectively, where $2 \leq n \leq 10$. Assume that in both code segments, elements of $Y$ are initialized to $0$ ... $2$ are contiguous in main memory Only S2 is correct Only S3 is correct Only S1 and S2 are correct Only S1 and S3 are correct
Srken
commented
in
Programming in C
Mar 10
by
Srken
8.7k
views
gatecse-2015-set3
programming-in-c
normal
array
2
votes
2
answers
30
cil-2017
teja1521
commented
in
Programming in C
Mar 9
by
teja1521
379
views
cil-2017
To see more, click for all the
questions in this category
.
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 activity 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:...