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 tagged array
5
votes
1
answer
61
GO Classes 2023 | Weekly Quiz 6 | Question: 2
What will be the output of the following program? #include<stdio.h> main() { int a[2][3][4]; printf("%d", a[1][0]-a[0][2]); }
GO Classes
asked
in
Programming in C
Apr 6, 2022
by
GO Classes
536
views
goclasses_wq6
goclasses
programming
programming-in-c
array
output
numerical-answers
2-marks
4
votes
1
answer
62
GO Classes 2023 | Weekly Quiz 6 | Question: 9
What will be the output of the following program? #include<stdio.h> void swap(char **s1, char **s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int main() { char *str[3]= {"orange", "apple", "pear"} ... ;%s %s %s", strs[0], strs[1], strs[2]); } pear apple orange apple pear orange orange apple pear apple orange pea
GO Classes
asked
in
Programming in C
Apr 6, 2022
by
GO Classes
551
views
goclasses_wq6
goclasses
programming
programming-in-c
array
array-of-pointers
2-marks
3
votes
1
answer
63
GO Classes 2023 | Weekly Quiz 6 | Question: 12
#include<stdio.h> #include<string.h> char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str); } int main() { char str[] = "hello"; ... %s", upstr); } What will be the output of the given program? h*e*l*l*o h*e*l*l*o* h*e*l*l* hello
GO Classes
asked
in
Programming in C
Apr 6, 2022
by
GO Classes
358
views
goclasses_wq6
goclasses
programming
programming-in-c
array
2-marks
3
votes
1
answer
64
GO Classes 2023 | Weekly Quiz 6 | Question: 13
#include<stdio.h> int bar(int data[], int i, int a, int x) { if (x<0) return 0; x--; int b = a + data[i]; if(data[i] >0) return bar(data, i+1, b, x); if(data[i] == 0 || i ==x-1) return a; return -a; } int main() ... ;data+1)-data; printf("%d", bar(data, 0, 0, x) ); } What will be the output of a given program? $6$ $-6$ $0$ $5$
GO Classes
asked
in
Programming in C
Apr 6, 2022
by
GO Classes
511
views
goclasses_wq6
goclasses
programming
programming-in-c
array
2-marks
0
votes
1
answer
65
CRT-2022
Kindly help
rsansiya111
asked
in
DS
Feb 25, 2022
by
rsansiya111
365
views
array
12
votes
1
answer
66
GATE CSE 2022 | Question: 33
What is printed by the following $\text{ANSI C}$ program? #include<stdio.h> int main (int argc, char *argv[]) { int a[3][3][3] = {{1, 2, 3, 4, 5, 6, 7, 8, 9}, {10, 11, 12, 13, 14, 15, 16, 17, 18}, {19, 20, 21, 22, 23, 24, 25, 26, 27}} ... $\begin {array}{} 1 & 2 & 3 \\ 13 & 14 & 15 \\ 25 & 26 & 27 \end{array}$
Arjun
asked
in
Programming in C
Feb 15, 2022
by
Arjun
7.9k
views
gatecse-2022
programming
programming-in-c
array
output
2-marks
1
vote
1
answer
67
Applied Test Series: Live Mock
A 30*30 upper triangular matrix of integers is stored optimally in a 1-D array with starting address of 3000 assume the matrix indexing starts at (1,1) and array indexing starts at 0 what would be the address of element with index (25,25)), ... integer takes up two bytes of memory.___ Need help in this one. Didn't get the solution properly provided by them. Anyone!
ramakrushna
asked
in
DS
Jan 10, 2022
by
ramakrushna
752
views
test-series
data-structures
array
0
votes
1
answer
68
NPTEL Assignment Question
Suppose we want to extend the union-find data structure to support the operation Reset(c), which takes as input the name of a component c and then breaks up c into singleton components, like MakeUnionFind(). For instance if c = 3 and c currently ... representation: O(n), Pointer representation: O(size(c)) Array representation: O(size(c)), Pointer representation: O(size(c))
rsansiya111
asked
in
Algorithms
Dec 8, 2021
by
rsansiya111
1.2k
views
algorithms
array
time-complexity
nptel-quiz
2
votes
2
answers
69
Applied Test Series
Consider an array contains n integers, each integer belongs to {0, 1, 2}. What is the best case time complexity to sort an array?
LRU
asked
in
Algorithms
Oct 15, 2021
by
LRU
640
views
test-series
algorithms
time-complexity
array
37
votes
11
answers
70
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$
Arjun
asked
in
Programming in C
Feb 18, 2021
by
Arjun
29.9k
views
gatecse-2021-set2
programming-in-c
array
output
1-mark
33
votes
4
answers
71
GATE CSE 2021 Set 1 | Question: 2
Let $P$ be an array containing $n$ integers. Let $t$ be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of $n$ elements. Which one of the following choices is correct ... $t>\lceil \log_2(n)\rceil \text{ and } t\leq n$
Arjun
asked
in
DS
Feb 18, 2021
by
Arjun
16.5k
views
gatecse-2021-set1
data-structures
array
1-mark
1
vote
1
answer
72
NIELIT Scientific Assistant A 2020 November: 109
A program $\text{P}$ reads in $500$ integers in the range $[0\dots100]$ representing the scores of $500$ students. It then prints the frequency of each score above $50.$ What would be the best way for $\text{P}$ to store the ... An array of $50$ numbers An array of $100$ numbers An array of $500$ numbers A dynamically allocated array of $550$ numbers
gatecse
asked
in
DS
Dec 9, 2020
by
gatecse
671
views
nielit-sta-2020
data-structures
array
easy
3
votes
3
answers
73
UGC NET CSE | October 2020 | Part 2 | Question: 11
Suppose you are compiling on a machine with $1$-byte chars, $2$-byte shorts, $4$-byte ints, and $8$-byte doubles, and with alignment rules that require the address of every primitive data element to be an integer multiple of the element's size. ... int i; } A[10]; /*10 element array of structs */ $150$ bytes $320$ bytes $240$ bytes $200$ bytes
go_editor
asked
in
Programming in C
Nov 20, 2020
by
go_editor
2.8k
views
ugcnetcse-oct2020-paper2
programming-in-c
array
0
votes
3
answers
74
NIELIT 2016 MAR Scientist C - Section C: 53
An element in an array $X$ is called a leader if it is greater than all elements to the right of it in $X$. The best algorithm to find all leaders in an array solves it in linear time using a left to right pass of the array solves in linear time ... the array solves it using divide and conquer in time $\theta (n\log n)$ solves it in time $\theta (n^{2})$
admin
asked
in
Algorithms
Apr 2, 2020
by
admin
1.6k
views
nielit2016mar-scientistc
algorithms
array
3
votes
1
answer
75
NIELIT 2016 MAR Scientist C - Section C: 55
To sort many large objects or structures, it would be most efficient to place them in an array and sort the array pointers to them in an array and sort the array them in a linked list and sort the linked list references to them in an array and sort the array
admin
asked
in
DS
Apr 2, 2020
by
admin
1.4k
views
nielit2016mar-scientistc
data-structures
array
2
votes
4
answers
76
NIELIT 2017 July Scientist B (CS) - Section B: 4
Let $A$ be a square matrix of size $n\times n$. Consider the following program. What is the expected output? C=100 for i=1 to n do for j=1 to n do { Temp=A[i][j]+C A[i][j]=A[j][i] A[j][i]=Temp-C } ... itself. Transpose of matrix $A$. Adding $100$ to the upper diagonal elements and subtracting $100$ from diagonal elements of $A$. None of the option.
admin
asked
in
DS
Mar 30, 2020
by
admin
1.2k
views
nielit2017july-scientistb-cs
data-structures
array
1
vote
3
answers
77
NIELIT 2017 July Scientist B (CS) - Section B: 40
Kadane algorithm is used to find Maximum sum subsequence in an array Maximum sum subarray in an array Maximum product subsequence in an array Maximum product subarray in an array
admin
asked
in
DS
Mar 30, 2020
by
admin
3.8k
views
nielit2017july-scientistb-cs
data-structures
array
1
vote
3
answers
78
NIELIT 2017 DEC Scientist B - Section B: 8
Let $A$ be an array of $31$ numbers consisting of a sequence of $0$’s followed by a sequence of $1$’s. The problem is to find the smallest index $i$ such that $A[i]$ is $1$ by probing the minimum number of locations in $A$. The worst case number of probes performed by an optimal algorithm is $2$ $4$ $3$ $5$
admin
asked
in
Algorithms
Mar 30, 2020
by
admin
1.1k
views
nielit2017dec-scientistb
algorithms
searching
array
Page:
« prev
1
2
3
4
5
6
7
8
...
10
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)
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 tagged array
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:...