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
Recent questions and answers in Programming and DS
0
votes
0
answers
1
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
Mar 22
by
RahulVerma3
32
views
programming-in-c
programming
6
votes
3
answers
2
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.5k
views
isro2017
data-structures
linked-list
bad-question
37
votes
11
answers
3
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.9k
views
gatecse-2021-set2
programming-in-c
array
output
1-mark
46
votes
8
answers
4
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
16.0k
views
gatecse-2015-set3
programming
programming-in-c
normal
array
0
votes
0
answers
5
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
98
views
gatecse2024-set1
programming-in-c
1
vote
1
answer
6
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
243
views
drdocse-2022-paper1
data-structures
binary-tree
4-marks
descriptive
0
votes
1
answer
7
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
213
views
numerical-answers
algorithms
2
votes
2
answers
8
let x be an array of integer which of the following can not be present in the LHS of an assignment statement
teja1521
answered
in
Programming in C
Mar 11
by
teja1521
2.6k
views
1
vote
3
answers
9
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
10
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
332
views
drdocse-2022-paper1
data-structures
1-mark
fill-in-the-blanks
1
vote
1
answer
11
Array
Does C support fractional Indices? float x = some fraction; Is float a[x] valid declaration?
teja1521
answered
in
Programming in C
Mar 8
by
teja1521
138
views
array
programming-in-c
1
vote
2
answers
12
UPPCL AE 2018:34
What is the output of the following $\text{C}$ program? #include<stdio.h> int main(void){ char s1[] = “Hello”; char s2[] = “World!”; s1 = s2; printf(“%s”,s1); } “World!” “HelloWorld!” “Compilation error” “Hello”
teja1521
answered
in
Programming in C
Mar 8
by
teja1521
379
views
uppcl2018
programming
programming-in-c
output
2
votes
3
answers
13
Made Easy Mock -1
how does the program is working..? answer – 8
teja1521
answered
in
Programming in C
Mar 8
by
teja1521
402
views
programming
numerical-answers
made-easy-test-series
6
votes
3
answers
14
GO Classes Test Series 2024 | Programming | Test 2 | Question: 21
What will be the output of the following program? #include<stdio.h> int rec(int x, int y) { static int count = 0; if (x == 0) return count; count++; if (x > y) rec(x - y, y); else rec(x, y - x); return count; } main() { int i = 10, j = 2, n; n = rec(i, j); printf("%d", n); } $4$ $5$ $6$ Infinite loop
teja1521
answered
in
Programming in C
Mar 8
by
teja1521
391
views
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
1
vote
3
answers
15
GATE CSE 2024 | Set 1 | Question: 9
Consider the following $\mathrm{C}$ program: #include <stdio.h> void fX () { void fX () ; char a; int main() { if ((a=g e t c h a r()) ! = '\n') fX}() ; fX(); return 0 ; if (a ! ... program will not terminate The program will terminate with no output The program will terminate with $4321$ as output The program will terminate with $1234$ as output
shah___
answered
in
Programming in C
Mar 6
by
shah___
2.7k
views
gatecse2024-set1
programming
programming-in-c
0
votes
1
answer
16
s.balaguruswami
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast. i) 237.15.2.1 ii) 256.1.8.9 iii) 114.34.2.8 iv) 255.254.0.1 v) 8.8.8.8
sanjeet24
answered
in
Programming in C
Mar 5
by
sanjeet24
86
views
2
votes
2
answers
17
find the output
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; } (a) 2 3 5 6 (b) 2 3 4 5 (c) 4 5 0 0 (d) none of the above
ritiksri8
answered
in
Programming in C
Mar 4
by
ritiksri8
5.9k
views
programming-in-c
0
votes
0
answers
18
class question self doubt
#include<stdio.h> #include<conio.h> int main(){ int a[][3]={ {4,14,24},{5,15,25},{6,16,26}}; int *p[3]; int **ptr=p; p[0]=a; p[1]=a+1; p[2]=a+2; ++*p; ++p[0]; ++**ptr; ++*p[0]; ++ptr; ++*ptr; --*p[1]; --*ptr; ++ptr; --p[ ... ("\n%d,%d,%d",a[0][2],a[1][1],a[2][0]); printf("\n%d,%d,%d",*p[0],*p[1],*p[2]); } what is the output of above program
Emankashyap
asked
in
Programming in C
Mar 1
by
Emankashyap
119
views
0
votes
1
answer
19
c programming
#include <stdio.h> int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; } output is 255 , but please explain how
AniMan_7
answered
in
Programming in C
Feb 29
by
AniMan_7
210
views
programming-in-c
3
votes
2
answers
20
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$
AniMan_7
answered
in
Programming in C
Feb 28
by
AniMan_7
3.2k
views
gatecse2024-set2
programming
programming-in-c
69
votes
13
answers
21
GATE CSE 2017 Set 2 | Question: 55
Consider the following C program. #include<stdio.h> #include<string.h> int main() { char* c="GATECSIT2017"; char* p=c; printf("%d", (int)strlen(c+2[p]-6[p]-1)); return 0; } The output of the program is _______
B Bhatta
answered
in
Programming in C
Feb 28
by
B Bhatta
27.6k
views
gatecse-2017-set2
programming-in-c
numerical-answers
array
pointers
59
votes
4
answers
22
GATE CSE 2014 Set 2 | Question: 40
Consider the following function. double f(double x){ if( abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); } Give a value $q$ (to $2$ decimals) such that $f(q)$ will return $q$:_____.
B Bhatta
answered
in
Programming in C
Feb 26
by
B Bhatta
18.0k
views
gatecse-2014-set2
programming
recursion
numerical-answers
normal
0
votes
1
answer
23
Linked List
How can we find the highest element in a singly linked list in O(1)? We are free to use any extra space.
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
answered
in
Programming in C
Feb 26
by
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
142
views
linked-list
data-structures
algorithms
1
vote
0
answers
24
I have purchased the IIIT Hyderabad 2024 test series but i can't find the test series anywhere
Khushbu Chaudhary
asked
in
Programming in C
Feb 25
by
Khushbu Chaudhary
85
views
9
votes
3
answers
25
GO Classes Test Series 2024 | Programming | Test 1 | Question: 24
What will be the output of the following C program? Assume that negative numbers are represented using $2’s$ complement. #include<stdio.h> void main() { int a = 2; a = ~a+2 << 1; printf("%d",a); }
ritiksri8
answered
in
Programming in C
Feb 25
by
ritiksri8
975
views
goclasses2024-programming-1-weekly-quiz
numerical-answers
goclasses
programming
programming-in-c
output
1-mark
3
votes
2
answers
26
GO Classes Test Series 2024 | Programming | Test 3 | Question: 23
What will be the output of the following lines of code? int i = 0; int j = 0; char *s = "ceded"; while (s[i] != '\0') { j = j + s[i] - 'b'; i = i + 1; } printf("%d %d\n", i, j); $5\; 11$ $4\; 16$ $5\; 16$ $4 \;11$
ritiksri8
answered
in
Programming in C
Feb 25
by
ritiksri8
280
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
loop
output
2-marks
6
votes
3
answers
27
GO Classes Weekly Quiz 2 | Programming in C | Propositional Logic | Question: 2
What will be output printed by the following program? #include<stdio.h> main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB "); break; default: printf("IISc "); case 3: printf("IITM " ... ;); } } $\text{IITB IITM}$ $\text{IITB IISc IITM}$ $\text{IITB}$ $\text{IITB IITM IITD}$
ritiksri8
answered
in
Programming in C
Feb 25
by
ritiksri8
978
views
goclasses_wq2
goclasses
programming
programming-in-c
output
1-mark
4
votes
3
answers
28
GO Classes Scholarship 2023 | Test | Question: 16
Consider the following declaration of variables $a$ and $b.$ int a = 1, b = 0; Which of the following is/are will evaluate to TRUE? b++ && b == a b++ && a == 0 a || b == --a a || ++b == 0
ritiksri8
answered
in
Programming in C
Feb 25
by
ritiksri8
690
views
goclasses-scholarship-test1
goclasses
programming
programming-in-c
multiple-selects
2-marks
7
votes
2
answers
29
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 33
On a $64$-bit system, which of the following C expressions is equivalent to the C expression $(x[2]+4)[3]?$ Assume $\mathrm{x}$ is declared as $\textsf{int}\ast \ast \textsf{x}$ $\ast((*(x+16))+28)$ $\ast((*(x+2))+7)$ $\ast(((* x)+2)+7)$ $(* \ast(x+2)+7)$
teja1521
answered
in
Programming in C
Feb 25
by
teja1521
425
views
goclasses2024-mockgate-14
programming
programming-in-c
pointers
1-mark
1
vote
2
answers
30
Pointers
Main() { char far *s1,*s2; Printf("%d%d",size of(s1),sizeof(s2)); }
ritiksri8
answered
in
Programming in C
Feb 24
by
ritiksri8
686
views
24
votes
2
answers
31
GATE CSE 2006 | Question: 77
Statement for Linked Answer Questions 76 & 77: A $3$-ary max heap is like a binary max heap, but instead of $2$ children, nodes have $3$ children. A $3$-ary heap can be represented by an array as follows: The root is stored in the first location, $a[0]$, nodes in the next level, from left to ... $10, 9, 4, 5, 7, 6, 8, 2, 1, 3$ $10, 8, 6, 9, 7, 2, 3, 4, 1, 5$
Maddy_dahiphale
answered
in
DS
Feb 22
by
Maddy_dahiphale
7.4k
views
gatecse-2006
data-structures
binary-heap
normal
7
votes
2
answers
32
Test by Bikram | Programming | Test 2 | Question: 16
What will be the output of this program ? #define square(x) x*x main() { int z; z = 25/square(5); printf("%d",z); }
ritiksri8
answered
in
Programming in C
Feb 21
by
ritiksri8
360
views
tbb-programming-2
numerical-answers
1
vote
2
answers
33
Functions and storage classes, Gate Wallah Practice Sheet,
I am getting (b) 5 ?? Can you please explain the_ int i_ in for loop and display() [MCQ] 44. Consider the following function: void display() { static int i; if(i<=printf("GATE24")) { i=i+2; display(); } } int main() { int i=0; ... ;3;i++) display(); return 0; } The number of times printf() executed is- (a) 6 (b) 5 (c) 7 (d) 9
ritiksri8
answered
in
Programming in C
Feb 21
by
ritiksri8
577
views
programming-in-c
storage-classes-in-c
46
votes
5
answers
34
GATE CSE 2018 | Question: 29
#include<stdio.h> void fun1(char* s1, char* s2){ char* temp; temp = s1; s1 = s2; s2 = temp; } void fun2(char** s1, char** s2){ char* temp; temp = *s1; *s1 = *s2; *s2 = temp; } int main(){ char *str1="Hi", *str2 = "Bye"; fun1 ... of the program above is: $\text{Hi Bye Bye Hi}$ $\text{Hi Bye Hi Bye}$ $\text{Bye Hi Hi Bye}$ $\text{Bye Hi Bye Hi}$
ritiksri8
answered
in
Programming in C
Feb 19
by
ritiksri8
15.0k
views
gatecse-2018
programming-in-c
pointers
parameter-passing
normal
programming
2-marks
2
votes
2
answers
35
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$
1mohitpl
answered
in
Programming in C
Feb 18
by
1mohitpl
2.5k
views
gatecse2024-set2
programming
programming-in-c
0
votes
2
answers
36
GATE CSE 2024 | Set 1 | Question: 33
Consider a binary min-heap containing $105$ distinct elements. Let $k$ be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of $k$ is $53$ $52$ $27$ $1$
Swarnava Bose
answered
in
DS
Feb 18
by
Swarnava Bose
1.9k
views
gatecse2024-set1
data-structures
0
votes
1
answer
37
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}$
liontig37
answered
in
DS
Feb 17
by
liontig37
689
views
gate-ds-ai-2024
data-structures
hashing
uniform-hashing
0
votes
2
answers
38
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.
ankitgupta.1729
answered
in
Programming in Python
Feb 17
by
ankitgupta.1729
863
views
gate-ds-ai-2024
programming
0
votes
1
answer
39
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$
Anmol Verma
answered
in
Programming in Python
Feb 17
by
Anmol Verma
788
views
gate-ds-ai-2024
programming
1
vote
1
answer
40
GATE CSE 2024 | Set 2 | Question: 38
Let $\mathrm{S} 1$ and $\mathrm{S} 2$ be two stacks. $\mathrm{S} 1$ has capacity of $4$ elements. $\mathrm{S} 2$ has capacity of $2$ elements. $\text{S1}$ already has $4$ elements: $100,200,300$, and $400$ ... output sequences can be generated by using the above operations? $100,200,400,300$ $200,300,400,100$ $400,200,100,300$ $300,200,400,100$
Hira Thakur
answered
in
DS
Feb 17
by
Hira Thakur
1.7k
views
gatecse2024-set2
data-structures
stack
multiple-selects
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 questions and answers 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:...