Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged non-gate
3
votes
1
answer
361
Programming
#include<stdio.h> int main() { char arr[5][7][6]; char *p[5][7][6]; printf("%d\t", (unsigned)(arr+1)-(unsigned)arr); printf("%d", (unsigned)(p+1)-(unsigned)p); } Please enlighten about the 2nd printf statement. Also what is the difference between the two statements?
#include<stdio.h int main() { char arr[5][7][6]; char *p[5][7][6]; printf("%d\t", (unsigned)(arr+1)-(unsigned)arr); printf("%d", (unsigned)(p+1)-(unsigned)p); }Please enl...
just_bhavana
1.6k
views
just_bhavana
asked
Jan 18, 2018
Programming in C
non-gate
+
–
6
votes
3
answers
362
ISRO-2017
Q.A strictly binary tree with 10 leaves A) cannot have more than 19 nodes B) has exactly 19 nodes C)has exactly 17 nodes D) has exactly 20 nodes
Q.A strictly binary tree with 10 leavesA) cannot have more than 19 nodesB) has exactly 19 nodesC)has exactly 17 nodesD) has exactly 20 nodes
junaid ahmad
7.4k
views
junaid ahmad
asked
Dec 17, 2017
Programming in C
isro2017
non-gate
+
–
3
votes
1
answer
363
ISRO-2017
Consider the code segment int i,j,x,y,m,n; n=20; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i%2) { x+=((4*j)+5*i); y+=(7+4*j); } } } m=x+y; Which one of the following is false ? A) The code contains ... B) There is scope of common sub-expression elimination in this code C)There is scope of strength reduction in this code D)There is scope of dead code elimination in this code
Consider the code segmentint i,j,x,y,m,n; n=20; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i%2) { x+=((4*j)+5*i); y+=(7+4*j); } } } m=x+y;Which one of the following is fals...
junaid ahmad
2.7k
views
junaid ahmad
asked
Dec 17, 2017
Programming in C
isro2017
non-gate
+
–
5
votes
3
answers
364
ISRO-DEC2017-78
Consider the results of a medical experiment that aims to predict whether someone is going to develop myopia based on some physical measurements and heredity. In this case, the input dataset consists of the person's medical characteristics and the target ... and $0$ for those who aren't. This can be best classified as Regression Decision Tree Clustering Association Rules
Consider the results of a medical experiment that aims to predict whether someone is going to develop myopia based on some physical measurements and heredity. In this cas...
gatecse
3.2k
views
gatecse
asked
Dec 17, 2017
Data Mining and Warehousing
isrodec2017
non-gate
knowledge-representation
+
–
0
votes
1
answer
365
ISRO-2017
Let S be an NP-complete problem.Q and R are other two problems not known to be NP.Q is polynomial time reducible to S and S is polynomial time reducible to R.Which of the following statements is true ? A) R is NP-complete B) R is NP-hard C) Q is NP-complete D) Q is NP-hard
Let S be an NP-complete problem.Q and R are other two problems not known to be NP.Q is polynomial time reducible to S and S is polynomial time reducible to R.Which of the...
junaid ahmad
2.2k
views
junaid ahmad
asked
Dec 17, 2017
Algorithms
isro2017
non-gate
+
–
2
votes
1
answer
366
ISRO-2017
Q.Consider the following query : Select E.no,COUNT(*) FROM Employee E GROUP BY E.no If an index on eno is available,the query can be answered by scanning only the index if A) the index is only hash and clustered B) the index is only B+ tree and clustered C)index can be hash or B+ tree and clustered or non-clustered D)index can be hash or B+ tree and clustered
Q.Consider the following query :Select E.no,COUNT(*) FROM Employee E GROUP BY E.noIf an index on eno is available,the query can be answered by scanning only the index ifA...
junaid ahmad
3.1k
views
junaid ahmad
asked
Dec 17, 2017
Databases
isro2017
databases
indexing
non-gate
+
–
4
votes
1
answer
367
TIFR CSE 2018 | Part B | Question: 15
$G$ respresents an undirected graph and a cycle refers to a simple cycle (no repeated edges or vertices). Define the following two languages. $\text{SCYCLE}=\{(G,k)\mid G \text{ contains a cycle of length at most k}\}$ ... $\text{SCYCLE}$ to $\text{LCYCLE}$).
$G$ respresents an undirected graph and a cycle refers to a simple cycle (no repeated edges or vertices). Define the following two languages.$\text{SCYCLE}=\{(G,k)\mid G ...
Arjun
1.0k
views
Arjun
asked
Dec 10, 2017
Theory of Computation
tifr2018
theory-of-computation
reduction
p-np-npc-nph
non-gate
+
–
2
votes
1
answer
368
TIFR CSE 2018 | Part A | Question: 2
Consider the following subset of $\mathbb{R} ^{3}$ (the first two are cylinder, the third is a plane): $C_{1}=\left \{ \left ( x,y,z \right ): y^{2}+z^{2}\leq 1 \right \};$ ... $A?$ Circle Ellipse Triangle Square An octagonal convex figure with curved sides
Consider the following subset of $\mathbb{R} ^{3}$ (the first two are cylinder, the third is a plane):$C_{1}=\left \{ \left ( x,y,z \right ): y^{2}+z^{2}\leq 1 \right \};...
Arjun
866
views
Arjun
asked
Dec 10, 2017
Quantitative Aptitude
tifr2018
quantitative-aptitude
geometry
three-dimensional-geometry
non-gate
+
–
1
votes
1
answer
369
google
main() { int a; scanf("%i"&a); printf("%i %d",a,a); scanf("%d",&a); printf("%i %d",a,a); } suppose user entered 0101 as input .what is printed by above program?
main(){int a;scanf("%i"&a);printf("%i %d",a,a);scanf("%d",&a);printf("%i %d",a,a);}suppose user entered 0101 as input .what is printed by above program?
eyeamgj
783
views
eyeamgj
asked
Nov 22, 2017
Programming in C
programming-in-c
non-gate
+
–
0
votes
1
answer
370
google
main() { int a; scanf("%i"&a); printf("%i %d",a,a); scanf("%d",&a); printf("%i %d",a,a); } suppose user entered 0x56 as input .what is printed by above program?
main(){int a;scanf("%i"&a);printf("%i %d",a,a);scanf("%d",&a);printf("%i %d",a,a);}suppose user entered 0x56 as input .what is printed by above program?
eyeamgj
335
views
eyeamgj
asked
Nov 22, 2017
Programming in C
programming-in-c
non-gate
+
–
1
votes
0
answers
371
c program
#include <stdio.h> main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\ T|S~Pn SPm SOn TNn ULo0ULo#ULo- ... > 64 ; ) putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0; } can any one explain this code
#include <stdio.h main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ N...
saipriyab
406
views
saipriyab
asked
Nov 21, 2017
Programming in C
bad-question
non-gate
+
–
2
votes
1
answer
372
How to determine the time complexity of this loop?
// func() is any constant root function for (int i = n; i > 0; i = func(i)) { // some O(1) expressions or statements } "In this case, i takes values n, n1/k, (n1/k)1/k = n1/k2, ... do we calculate that there are logk(log(n)) iterations? Source: http://www.geeksforgeeks.org/time-complexity-loop-loop-variable-expands-shrinks-exponentially/
// func() is any constant root functionfor (int i = n; i 0; i = func(i)){ // some O(1) expressions or statements}"In this case, i takes values n, n1/k, (n1/k)1/k = n1/...
Narasimhan
1.0k
views
Narasimhan
asked
Nov 7, 2017
Algorithms
algorithms
asymptotic-notation
time-complexity
space-complexity
non-gate
+
–
5
votes
1
answer
373
UGC NET CSE | November 2017 | Part 2 | Question: 32
Consider the following assembly program fragment: stc mov al, 11010110b mov cl,2 rcl al,3 rol al, 4 shr al, cl mul cl The contents of the destination register $ax$ (in hexadecimal ) and the status of Carry Flag (CF) after the execution of above instructions, are: $ax =003CH; \: CF=0$ $ax=001EH; \: CF=0$ $ax=007BH; \: CF=1$ $ax=00B7H; \: CF=1$
Consider the following assembly program fragment:stc mov al, 11010110b mov cl,2 rcl al,3 rol al, 4 shr al, cl mul clThe contents of the destination register $ax$ (in hexa...
Arjun
5.3k
views
Arjun
asked
Nov 5, 2017
CO and Architecture
ugcnetcse-nov2017-paper2
8085-microprocessor
non-gate
+
–
3
votes
1
answer
374
C PROGRAMMING
OUTPUT OF THE FOLLOWING PROGRAMME #include<stdio.h> int main() { int n1=10; int n2=15; int n3; n3=~n1; printf("%d",n3); return 0; } Basically here i want to understand how do we store negation value and what are the changes done,for a signed and unsigned integers here considering integer is of 4 bytes here.
OUTPUT OF THE FOLLOWING PROGRAMME#include<stdio.h int main() { int n1=10; int n2=15; int n3; n3=~n1; printf("%d",n3); return 0; }Basically here i want to understand how d...
junaid ahmad
452
views
junaid ahmad
asked
Oct 31, 2017
Programming in C
programming-in-c
non-gate
+
–
3
votes
0
answers
375
c++ Programming
Explain the following code..especially the loop part #1 & #2 of below code:- [Code is printing the maximum number of integers you can select from the array such that the absolute difference between any two of the chosen integers is <=1]. int main() { int n,k,max = 0; cin>>n; int a ... 1;i++){ //#2 if(a[i]+a[i+1]> max) max = a[i]+a[i+1]; } cout<<max; return 0; }
Explain the following code..especially the loop part #1 & #2 of below code:- [Code is printing the maximum number of integers you can select from the array such that the ...
Naveen Kumar 3
386
views
Naveen Kumar 3
asked
Oct 21, 2017
Object Oriented Programming
non-gate
+
–
2
votes
1
answer
376
Thegatebook
Q1)Output with explanation Long int a = scanf("%Id %Id",&a,&a); Printf("%id",a); (A) error (B) garbage value (C) zero (D) 2
Q1)Output with explanationLong int a = scanf("%Id %Id",&a,&a);Printf("%id",a);(A) error(B) garbage value(C) zero(D) 2
Lakshman Bhaiya
1.2k
views
Lakshman Bhaiya
asked
Sep 25, 2017
Programming in C
programming-in-c
non-gate
+
–
2
votes
1
answer
377
Programming
Please explain the output. #include<stdio.h> int main() { int c; printf("geeks for %ngeeks ", &c); printf("%d", c); getchar(); return 0; }
Please explain the output.#include<stdio.h>int main(){ int c; printf("geeks for %ngeeks ", &c); printf("%d", c); getchar(); return 0;}
Shubham Kumar Gupta
403
views
Shubham Kumar Gupta
asked
Sep 20, 2017
Programming in C
non-gate
+
–
2
votes
1
answer
378
Data types and sizes
atul_21
768
views
atul_21
asked
Sep 10, 2017
Programming in C
non-gate
+
–
5
votes
3
answers
379
c programming
Will it result in to an error if a header file is included twice? [A]. Yes [B]. No [C]. It is compiler dependent
Will it result in to an error if a header file is included twice?[A].Yes[B].No[C].It is compiler dependent
suvasish pal
633
views
suvasish pal
asked
Aug 26, 2017
Programming in C
programming-in-c
non-gate
+
–
1
votes
1
answer
380
Programming in C
#include <stdio.h> int main(void){ int i=511; char *p = (char *)&i; printf("%d", *p); } OK so why take 2's complement and not simple binary number? Means, why is C giving -1 and not 255?
#include <stdio.h int main(void){ int i=511; char *p = (char *)&i; printf("%d", *p); }OK so why take 2's complement and not simple binary number? Means, why is C giving -...
Vasu Srivastava
1.1k
views
Vasu Srivastava
asked
Aug 18, 2017
Programming in C
programming-in-c
pointers
output
non-gate
+
–
1
votes
0
answers
381
File input output
int main(void) { // your code goes here int main() { FILE *fp; char ch, str[7]; fp=fopen("test.c", "r"); /* file 'try.c' contains "This is manipal" */ fseek(fp, 9L, SEEK_CUR); fgets(str, 5, fp); puts(str); return 0;
int main(void) { // your code goes here int main(){FILE *fp;char ch, str[7];fp=fopen("test.c", "r"); /* file 'try.c' contains "This is manipal" */fseek(fp, 9L, SEEK...
Purnima Digra
342
views
Purnima Digra
asked
Jul 26, 2017
Programming in C
non-gate
+
–
2
votes
0
answers
382
Graph Degree sequence : Bondy and Murty : $1.1.16$
Let $d = (d_1,d_2,\dots, d_n)$ be a nonincreasing sequence of nonnegative integers, that is, $d_1 \geq d_2 \geq · · · \geq d_n \geq 0$. Show that: there is a loopless graph with degree sequence d if and only if $\sum_{i=1}^{n}d_i$ is even and $d_1 \leq \sum_{i=2}^{n}d_i$
Let $d = (d_1,d_2,\dots, d_n)$ be a nonincreasing sequence of nonnegative integers, that is, $d_1 \geq d_2 \geq · · · \geq d_n \geq 0$. Show that:there is a loopless g...
dd
457
views
dd
asked
Jul 4, 2017
Graph Theory
graph-theory
non-gate
proof
degree-of-graph
+
–
1
votes
0
answers
383
Graph Theory : Bondy-Murty $1.1.20$
Let $S$ be a set of $n$ points in the plane, the distance between any two of which is at least one. Show that there are at most $3n$ pairs of points of S at distance exactly one. Can this be done with a unit circle and we can place at max. $6$ points on the perimeter and doing the same for other points as well ? i.e. we can get $6n/2 = 3n$ pairs at max. ?
Let $S$ be a set of $n$ points in the plane, the distance between any two of which is at least one. Show that there are at most $3n$ pairs of points of S at distance exac...
dd
319
views
dd
asked
Jul 4, 2017
Graph Theory
graph-theory
non-gate
proof
+
–
2
votes
0
answers
384
Graphic Sequence condition
A sequence $d = (d_1,d_2,\dots , d_n)$ is graphic if there is a simple graph with degree sequence $d$ If $d = (d_1,d_2,d_3, \dots d_n)$ is graphic and $d_1 \geq d_2 \geq d_3 \geq \dots \geq d_n$ , then show that $\sum_{i=1}^{n}d_i$ is even and $\sum_{i=1}^{k}d_i \leq \left [ k(k-1) + \sum_{i=k+1}^{n} \min\{k,d_i\} \right ] \quad ,1 \leq k \leq n$.
A sequence $d = (d_1,d_2,\dots , d_n)$ is graphic if there is a simple graph with degree sequence $d$If $d = (d_1,d_2,d_3, \dots d_n)$ is graphic and $d_1 \geq d_2 \geq d...
dd
414
views
dd
asked
Jul 4, 2017
Graph Theory
non-gate
graph-theory
proof
+
–
1
votes
1
answer
385
What are the advantages of social bookmarking to a website?
Jaksonsalazhar
244
views
Jaksonsalazhar
asked
Jul 2, 2017
Databases
non-gate
+
–
–1
votes
2
answers
386
Programmming
int main(){ int a =5; printf("%d %d %d %d %d ",a++,a--,++a,--a,a); } Output is "4 5 5 5 5". How????
int main(){int a =5;printf("%d %d %d %d %d ",a++,a ,++a, a,a);}Output is "4 5 5 5 5". How????
atul_21
3.7k
views
atul_21
asked
Jun 30, 2017
Programming in C
non-gate
+
–
3
votes
1
answer
387
combinatorial argument
$\begin{align*} &\text{Prove using combinatorial argument } \\ &1) \qquad \text{For } n \geq k \geq 0 \qquad \left ( n-k \right )\cdot \binom{n}{k} = n \cdot \binom{n-1}{k} \\ &2) \qquad \text{For } n \geq 2 \qquad \quad k \cdot (k-1) \cdot \binom{n}{k} = n \cdot (n-1) \cdot \binom{n-2}{k-2} \\ \end{align*}$
$\begin{align*} &\text{Prove using combinatorial argument } \\ &1) \qquad \text{For } n \geq k \geq 0 \qquad \left ( n-k \right )\cdot \binom{n}{k} = n \cdot \binom{n-1}{...
dd
466
views
dd
asked
Jun 26, 2017
Combinatory
non-gate
combinatory
+
–
1
votes
0
answers
388
Integer Sequence
... $\begin{align*} |A| = |B| \end{align*}$
$\begin{align*} &\text{A} = \text{Set of integer sequence }\left ( a_1,a_2,a_2 ,\dots , a_k \right ) \\ &\text{where } 1 \leq a_1 \leq a_2 \leq a_3 \leq \dots \leq a_k \l...
dd
226
views
dd
asked
Jun 26, 2017
Combinatory
non-gate
combinatory
+
–
1
votes
0
answers
389
Combinatoric properties
Prove that : $\begin{align*} &\text{For n , k , m are integers and } 0 < m \leq k < n \\ &\text{GCD}\left [ \binom{n}{m},\binom{n}{k} \right ] > 1 \\ \end{align*}$
Prove that :$\begin{align*} &\text{For n , k , m are integers and } 0 < m \leq k < n \\ &\text{GCD}\left [ \binom{n}{m},\binom{n}{k} \right ] 1 \\ \end{align*}$
dd
180
views
dd
asked
Jun 26, 2017
Combinatory
combinatory
non-gate
+
–
1
votes
2
answers
390
Output of Code
#include <stdio.h> int main() { int a; char *x; x= (char *) &a; a=512; x[0]=1; x[1]=2; printf("%d\n",a); return 0; }
#include <stdio.h int main() { int a; char *x; x= (char *) &a; a=512; x[0]=1; x =2; printf("%d\n",a); return 0; }
Ashwani Kumar 2
1.1k
views
Ashwani Kumar 2
asked
Jun 25, 2017
Programming in C
programming-in-c
non-gate
+
–
Page:
« prev
1
...
8
9
10
11
12
13
14
15
16
17
18
...
24
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register