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
No answer
No selected answer
No upvoted answer
Previous GATE
Featured
Questions without a selected answer 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
35
views
programming-in-c
programming
0
votes
0
answers
2
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
101
views
gatecse2024-set1
programming-in-c
0
votes
0
answers
3
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
4
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
SSR17
asked
in
Programming in C
Feb 29
by
SSR17
213
views
programming-in-c
1
vote
0
answers
5
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
86
views
0
votes
1
answer
6
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.
Mrityudoot
asked
in
Programming in C
Feb 25
by
Mrityudoot
143
views
linked-list
data-structures
algorithms
0
votes
1
answer
7
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
Sheikh Rafi
asked
in
Programming in C
Feb 24
by
Sheikh Rafi
88
views
0
votes
1
answer
8
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}$
Arjun
asked
in
DS
Feb 16
by
Arjun
693
views
gate-ds-ai-2024
data-structures
hashing
uniform-hashing
0
votes
1
answer
9
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 $\_\_\_\_\_\_\_\_$.
Arjun
asked
in
DS
Feb 16
by
Arjun
667
views
gate-ds-ai-2024
numerical-answers
data-structures
0
votes
1
answer
10
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$
Arjun
asked
in
Programming in Python
Feb 16
by
Arjun
792
views
gate-ds-ai-2024
programming
0
votes
2
answers
11
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.
Arjun
asked
in
Programming in Python
Feb 16
by
Arjun
867
views
gate-ds-ai-2024
programming
3
votes
2
answers
12
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$
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
3.2k
views
gatecse2024-set2
programming
programming-in-c
3
votes
1
answer
13
GATE CSE 2024 | Set 2 | Question: 23
Consider the following $\mathrm{C}$ function definition. int f X(char * a) { char * b = a; while (*b) b ++; return b - a; } Which of the following statements is/are TRUE? The function call $\text{f X("a b c d''}$) will ... ${ }^{*} \mathrm{C}=$ "abcd" in main (), the function call $\mathrm{fX}(\mathrm{c})$ will always return a value
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
2.1k
views
gatecse2024-set2
programming
programming-in-c
multiple-selects
2
votes
2
answers
14
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$
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
2.5k
views
gatecse2024-set2
programming
programming-in-c
3
votes
2
answers
15
GATE CSE 2024 | Set 2 | Question: 32
Consider an array $\mathrm{X}$ that contains $\mathrm{n}$ positive integers. A subarray of $\mathrm{X}$ is defined to be a sequence of array locations with consecutive indices. The $\mathrm{C}$ code snippet given below has been written to compute the length of the longest ... $\text{(P) } \text{len} 2+1$ $\text{(Q) } \text{len} 1+1$
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
1.7k
views
gatecse2024-set2
programming
programming-in-c
1
vote
1
answer
16
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$
Arjun
asked
in
DS
Feb 16
by
Arjun
1.7k
views
gatecse2024-set2
data-structures
stack
multiple-selects
3
votes
3
answers
17
GATE CSE 2024 | Set 1 | Question: 8
Consider the following $\mathrm{C}$ program: #include <stdio.h> int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; } Which one of the following ... The program prints $9$ as output The program prints $10$ as output The program gets stuck in an infinite loop The program prints $6$ as output
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
5.5k
views
gatecse2024-set1
programming
programming-in-c
1
vote
3
answers
18
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
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
2.7k
views
gatecse2024-set1
programming
programming-in-c
0
votes
2
answers
19
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$
Arjun
asked
in
DS
Feb 16
by
Arjun
1.9k
views
gatecse2024-set1
data-structures
2
votes
1
answer
20
GATE CSE 2024 | Set 1 | Question: 38
Consider the following $\mathrm{C}$ function definition. int $\mathrm{f}$ (int $\mathrm{x}$, int $\mathrm{y})$ { for (int $i=0 ; i<y ; i++$ ) { $\mathrm{x}=\mathrm{x}+\mathrm{x}+\mathrm{y}$; } return $\mathrm{x}$; } Which of the ... $2^{10}$ If the inputs are $x=10, y=20$, then the return value is greater than $2^{20}$
Arjun
asked
in
Programming in C
Feb 16
by
Arjun
1.9k
views
gatecse2024-set1
multiple-selects
programming
programming-in-c
5
votes
1
answer
21
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 16
Consider the following C code: double A[2][3] = {{1, 2, 3}, {4, 5, 6}}; Assume that A[0] = 0xFFAA0000 and the sizeof(double) is 8. What will be the value of `A[1]`? 0xFFAA0024 0xFFAA0003 0xFFAA000C 0xFFAA0018
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
484
views
goclasses2024-mockgate-14
programming
programming-in-c
array
1-mark
5
votes
2
answers
22
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 27
What is a statically allocated variable in C programming? A variable allocated at an absolute address in a program’s data space A variable allocated on the stack A variable allocated on the heap A variable which can NOT be defined as local variable
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
340
views
goclasses2024-mockgate-14
programming
programming-in-c
storage-classes-in-c
1-mark
7
votes
2
answers
23
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)$
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
427
views
goclasses2024-mockgate-14
programming
programming-in-c
pointers
1-mark
4
votes
1
answer
24
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 34
Suppose you implement a queue using a singly linked list with head and tail pointers so that the front of the queue is at the tail of the list, and the rear of the queue is at the head of the list. What is the best possible worst-case running ... $O(n)$ for dequeue. $O(n)$ for enqueue and $O(1)$ for dequeue. $O(n)$ for both functions.
GO Classes
asked
in
DS
Feb 5
by
GO Classes
335
views
goclasses2024-mockgate-14
data-structures
queue
linked-list
1-mark
4
votes
1
answer
25
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 42
The provided C code is a version of the C string library function strlen(), which calculates the length of a given string. unsigned int mystrlen(char *c) { unsigned int i = 0; /* Your code here. */ } Which line of code creates a working and ... != '\0') i++; return i; while (*(c + i) != '\0') ++i; return i;
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
379
views
goclasses2024-mockgate-14
programming
programming-in-c
strings
multiple-selects
2-marks
4
votes
1
answer
26
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 43
What will be the output of the following C program? #include <stdio.h> void Mickey(int**, int, int); void Mouse(int, int*); int main() { int a = 2, b = 3, c = 4; int *points = &a; Mickey(&points, b, c); printf("%d", ... x; *p = **points+1; Mouse(z, p); return; } void Mouse(int z, int *p) { *p = *p+1; return; }
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
373
views
goclasses2024-mockgate-14
numerical-answers
programming
programming-in-c
functions
2-marks
5
votes
2
answers
27
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 44
Let $B$ be a binary search tree (BST) with eight nodes filled with the following set of eight integer keys $A=\{10,2,5,3,20,15,9,22\}$. The order in which these keys were inserted to create $B$ is not known. However ... are required to verify if all eight keys of $A$ are present in $B$. How many leaf nodes are present in B?
GO Classes
asked
in
DS
Feb 5
by
GO Classes
431
views
goclasses2024-mockgate-14
numerical-answers
data-structures
binary-search-tree
2-marks
7
votes
1
answer
28
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 45
Consider a stack whose elements are unsigned integers and support the following operations: PUSH a: Pushes the element 'a' onto the stack. ADD: Adds the two topmost elements, removes them, and pushes the result. SQR: ... once, count it as many times as it is used. Your final count should include initial 3 PUSH instructions.
GO Classes
asked
in
DS
Feb 5
by
GO Classes
494
views
goclasses2024-mockgate-14
numerical-answers
data-structures
stack
2-marks
4
votes
1
answer
29
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 54
Consider the following pseudocode procedure. Which of the following best describes procedure mystery? It returns a list of numbers from 1 to $n$. It prints every third number from 1 to $n$. It returns the sum of the numbers from 1 to $\mathrm{n}$. It returns the sum of the multiples of 3 from 1 to $n$.
GO Classes
asked
in
Programming in C
Feb 5
by
GO Classes
205
views
goclasses2024-mockgate-14
programming
programming-in-c
functions
2-marks
0
votes
0
answers
30
Memory Based GATE DA 2024 | Question: 20
Consider the following Python code: S[1] = [1] x = [6, 3, 5, 4, 10] for i in range(2, len(x)): S[i] = [1] if x[i - 1]
GO Classes
asked
in
Programming
Feb 4
by
GO Classes
105
views
gate2024-da-memory-based
goclasses
programming
programming-in-python
To see more, click for the
full list of questions
or
popular tags
.
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
Engineering Mathematics
Digital Logic
Programming and DS
Programming
DS
Algorithms
Theory of Computation
Compiler Design
Operating System
Databases
CO and Architecture
Computer Networks
Artificial Intelligence
Machine Learning
Data Mining and Warehousing
Non GATE
Others
Admissions
Exam Queries
Tier 1 Placement Questions
Job Queries
Projects
Unknown Category
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
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:...