Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged two-marks
5
5 votes
4
answers
4 answers
2.7k
2.7k views
GATE Overflow | Programming | Test 1 | Question: 12
What will be returned by the following function foo when called as foo(10)?int foo(int n) { return n & n | 1; }
Arjun
2.7k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
numerical-answers
bitwise-operations
two-marks
+
–
8
8 votes
2
answers
2 answers
1.8k
1.8k views
GATE Overflow | Programming | Test 1 | Question: 11
What will be the outout of the following code?#include <stdio.h int main() { int a = 1, b = 2; int c = a++ || b++; printf("%d %d %d", a, b, c); }1 2 12 3 12 2 12 2 0
Arjun
1.8k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
short-circuit-rule
two-marks
+
–
5
5 votes
2
answers
2 answers
1.6k
1.6k views
GATE Overflow | Programming | Test 1 | Question: 10
What will be the output of the following program?#include <stdio.h void f1(int p1, int *p2, int p3) { p1 = 20; *p2 = p1; p3 = *p2; p1 = 10; } int main() { int a = 5, b ...
Arjun
1.6k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
pointers
two-marks
+
–
4
4 votes
2
answers
2 answers
2.4k
2.4k views
GATE Overflow | Programming | Test 1 | Question: 9
No. of times '*' will be printed by the following C code is _____#include<stdio.h void foo(int x) { switch(x){ case 1: printf("*"); case 2: printf("*"); case 3: printf("*...
Arjun
2.4k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
switch-case
numerical-answers
two-marks
+
–
6
6 votes
2
answers
2 answers
1.3k
1.3k views
GATE Overflow | Programming | Test 1 | Question: 8
What is the output of this program?#include <stdio.h int main() { char *ptr; char string[] = "Hello 2017"; ptr = string; ptr += 4; printf("%s",++ptr); }Hello 2017ello 201...
Arjun
1.3k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
pointers
two-marks
+
–
11
11 votes
2
answers
2 answers
2.1k
2.1k views
GATE Overflow | Programming | Test 1 | Question: 7
The output for the following C program will be#include <stdio.h int temp; int new(int t) { static int cal; cal = cal + t; return(cal); } int main() { int t, p; for(t=0; t...
Arjun
2.1k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
two-marks
+
–
7
7 votes
4
answers
4 answers
3.6k
3.6k views
GATE Overflow | Programming | Test 1 | Question: 6
The output of the following C program will be _____#include<stdio.h #define type int type foo(type b) { return b*b; } #undef type #define type float int main() { float a ...
Arjun
3.6k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
data-types
numerical-answers
two-marks
+
–
5
5 votes
3
answers
3 answers
4.6k
4.6k views
GATE Overflow | Programming | Test 1 | Question: 4
Consider the following C functions:int f1(int a, int b) { while (a != b) { if(a b) a = a - b; else b = b - a; } return a; } int f2(int a, int b) { while (b != 0) { int t...
Arjun
4.6k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
identify-function
two-marks
+
–
9
9 votes
2
2 answers
2.8k
2.8k views
GATE Overflow | Programming | Test 1 | Question: 2
Consider the following C function:void foo() { int a[10][20][30] = {0}; __________ printf("%d", a[3][4][5]); }Which of the following could be used in the missing line so ...
Arjun
2.8k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
pointers
two-marks
+
–
5
5 votes
2
answers
2 answers
2.8k
2.8k views
GATE Overflow | Programming | Test 1 | Question: 1
What will be the output of the following C program?#include <stdio.h int main() { int f1(int,int); int x = 9,n = 3; printf("%d", f1(x, n)); } int f1(int x, int n) { int y...
Arjun
2.8k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
two-marks
+
–
1
1 vote
2
2 answers
1.8k
1.8k views
GATE Overflow | Data Structures | Test 1 | Question: 29
Which of the following is false?Arrays are better than linked lists for sorting due to better data locality.Asymptotic time complxity for FindMax is same on an unsorted a...
Arjun
1.8k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
array
queue
two-marks
+
–
5
5 votes
1
answers
1 answer
2.2k
2.2k views
GATE Overflow | Data Structures | Test 1 | Question: 26
Consider a stack with 100 elements present. Suppose in a scenario, we are required to remove the first inserted element in it, which is done by POP operations followed by...
Arjun
2.2k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
stack
numerical-answers
two-marks
+
–
1
1 vote
2
2 answers
939
939 views
GATE Overflow | Data Structures | Test 1 | Question: 25
Consider the following nested representation of Binary Trees.$(ABC)$ indicates $B$ and $C$ are left and right subtrees of node $A$ respectively. Note that $B$ and $C$ may...
Arjun
939
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
binary-tree
two-marks
+
–
5
5 votes
3
answers
3 answers
2.6k
2.6k views
GATE Overflow | Data Structures | Test 1 | Question: 24
You are given a linked list, $L$ of $n$ integers, and another linked list, $P$, of $k$ integers where $k <<< n$. $L$ is sorted in ascending order but $P$ is not necessari...
Arjun
2.6k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
linked-list
two-marks
+
–
0
0 votes
2
answers
2 answers
948
948 views
GATE Overflow | Data Structures | Test 1 | Question: 23
Consider the following declaration of a two dimensional array in C:char a[1000][40];Assuming that the main memory is byte addressable and that the array is stored startin...
Arjun
948
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
programming-in-c
array
numerical-answers
two-marks
+
–
2
2 votes
2
answers
2 answers
1.4k
1.4k views
GATE Overflow | Data Structures | Test 1 | Question: 22
A function $f$ defined on stack of integer satisfies the following properties:$f(\{\}) = 1$ and$f(PUSH(S,i)) = \max (f(S),1) * i$ for all stacks $S$ and integer $i$.If a ...
Arjun
1.4k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
stack
numerical-answers
two-marks
+
–
3
3 votes
1
answers
1 answer
939
939 views
GATE Overflow | Data Structures | Test 1 | Question: 18
The maximum number of possible edges in an undirected simple graph with $100$ vertices and $5$ components is ___
Arjun
939
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
graph-theory
connected-components
numerical-answers
two-marks
+
–
6
6 votes
1
answers
1 answer
1.3k
1.3k views
GATE Overflow | Data Structures | Test 1 | Question: 13
When searching for the key value 30 in a binary search tree, nodes containing the key values 10, 20, 25, 35, 70, 80, 90, 100 are traversed, not necessarily in the order g...
Arjun
1.3k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
binary-search-tree
numerical-answers
two-marks
+
–
5
5 votes
4
answers
4 answers
2.2k
2.2k views
GATE Overflow | Data Structures | Test 1 | Question: 5
A stack is used to implement a priority queue where $ENQUEUE(Q, x, p)$ ($p$ denotes priority, higher the better) and $DEQUE(Q)$ are implemented by appropriate PUSH and PO...
Arjun
2.2k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
stack
priority-queue
numerical-answers
two-marks
+
–
2
2 votes
1
answers
1 answer
1.0k
1.0k views
GATE Overflow | Data Structures | Test 1 | Question: 1
The following C function takes a singly-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing th...
Arjun
1.0k
views
asked
Oct 10, 2016
Data Structures
go-ds-1
data-structures
linked-list
two-marks
+
–
2
2 votes
2
2 answers
1.0k
1.0k views
GATE Overflow | Algorithms | Test 1 | Question: 30
Match the following: i.BFSa.$O(\mid E \mid + \mid V \mid \log \mid V \mid)$ii.DFSb.$O(E)$iii.Kruskal's algorithmc.Stackiv.Dijikstra's Algorithmd.$O(E \log V)$i - b, ii - ...
Bikram
1.0k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
graph-algorithms
two-marks
+
–
2
2 votes
3
answers
3 answers
786
786 views
GATE Overflow | Algorithms | Test 1 | Question: 29
$$T(n) = \begin{cases} 4 & \quad if \: \: n =1 \\ T(n-1) + 4 & \quad otherwise \end{cases}$$Value of $T(1000)$ is ___
Bikram
786
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
recurrence-relation
algorithms
numerical-answers
two-marks
+
–
2
2 votes
1
answers
1 answer
959
959 views
GATE Overflow | Algorithms | Test 1 | Question: 28
Match the following i.Dijkstra's Algorithma.All pairs shortest pathii.Bellman Ford Algorithmb.Greedyiii.Floyd-Warshall Algorithmc.Reweightingiv.Johnson Algorithmd.Single ...
Bikram
959
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
graph-algorithms
two-marks
+
–
1
1 vote
2
answers
2 answers
1.6k
1.6k views
GATE Overflow | Algorithms | Test 1 | Question: 27
Consider a hash table of size $m = 10$ and a corresponding hash function $h(k) = k A \mod m$ for $A = 5$ where collisions are resolved by quadratic probing. The location...
Bikram
1.6k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
numerical-answers
algorithms
hashing
two-marks
+
–
4
4 votes
1
answers
1 answer
970
970 views
GATE Overflow | Algorithms | Test 1 | Question: 26
Maximum element in a min-heap represented by an array, can be computed in _____ time$O(n)$$O(\log n)$$O(n \log n)$ but not $O(n)$$O(1)$
Bikram
970
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
binary-heap
algorithms
two-marks
+
–
3
3 votes
2
2 answers
1.0k
1.0k views
GATE Overflow | Algorithms | Test 1 | Question: 25
Which of the below options is TRUE for this statement :Suppose we wish to repeatedly search a linked list of length N elements, each of which contains a very long string ...
Bikram
1.0k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
two-marks
+
–
2
2 votes
1
1 answer
884
884 views
GATE Overflow | Algorithms | Test 1 | Question: 24
Let you have an array $S[1 \dots n]$ and a function $reverse(s,i,j)$ which reverse the order of elements in $s$ between $i,j$-th positions. What does the following seque...
Bikram
884
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
two-marks
+
–
2
2 votes
2
answers
2 answers
1.4k
1.4k views
GATE Overflow | Algorithms | Test 1 | Question: 23
About how many compares will Quicksort() make when sorting an array of N items that are all equal?$\Theta(\lg N)$$\Theta(N\lg N)$$\Theta(\lg \lg N)$$\Theta(N/\lg N)$
Bikram
1.4k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
sorting
quick-sort
two-marks
+
–
3
3 votes
2
answers
2 answers
2.5k
2.5k views
GATE Overflow | Algorithms | Test 1 | Question: 22
Consider the below statements:Adding a constant to every edge weight does not change the solution to the single-source shortest-paths problem.Adding a constant to every e...
Bikram
2.5k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
minimum-spanning-tree
shortest-path
two-marks
+
–
4
4 votes
2
answers
2 answers
1.2k
1.2k views
GATE Overflow | Algorithms | Test 1 | Question: 21
A spell-checker software reads an input file and prints out all words not in some online dictionary. Suppose the dictionary contains 10,000 words and the file has one mil...
Bikram
1.2k
views
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
hashing
two-marks
+
–
Page:
« prev
1
...
240
241
242
243
244
245
246
247
248
next »