Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged programming-in-c
33
33 votes
7
answers
7 answers
18.3k
18.3k views
GATE IT 2008 | Question: 50
Consider the C program below. What does it print?# include <stdio.h # define swap1 (a, b) tmp = a; a = b; b = tmp void swap2 ( int a, int b) { int tmp; tmp = a; a = b; b ...
Ishrat Jahan
18.3k
views
asked
Oct 28, 2014
Programming in C
gateit-2008
programming
programming-in-c
easy
parameter-passing
+
–
60
60 votes
4
answers
4 answers
18.8k
18.8k views
GATE IT 2008 | Question: 49
What is the output printed by the following C code?# include <stdio.h int main () { char a [6] = "world"; int i, j; for (i = 0, j = 5; i < j; a [i++] = a [j ]); printf ("...
Ishrat Jahan
18.8k
views
asked
Oct 28, 2014
Programming in C
gateit-2008
programming
programming-in-c
normal
array
+
–
61
61 votes
3
answers
3 answers
15.8k
15.8k views
GATE CSE 2010 | Question: 11
What does the following program print?#include<stdio.h void f(int *p, int *q) { p=q; *p=2; } int i=0, j=1; int main() { f(&i, &j); printf("%d %d\n", i,j); return 0; }$2 \...
go_editor
15.8k
views
asked
Sep 29, 2014
Programming in C
gatecse-2010
programming
programming-in-c
easy
parameter-passing
+
–
62
62 votes
6
answers
6 answers
21.2k
21.2k views
GATE CSE 2012 | Question: 48
Consider the following C code segment.int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf(“ \n %d %d ”, a, b); ...
gatecse
21.2k
views
asked
Sep 29, 2014
Programming in C
gatecse-2012
programming
programming-in-c
normal
+
–
88
88 votes
5
answers
5 answers
37.1k
37.1k views
GATE CSE 2011 | Question: 22
What does the following fragment of C program print?char c[] = "GATE2011"; char *p = c; printf("%s", p + p[3] - p );$\text{GATE2011}$$\text{E2011}$$2011$$011$
go_editor
37.1k
views
asked
Sep 29, 2014
Programming in C
gatecse-2011
programming
programming-in-c
normal
array
+
–
60
60 votes
6
answers
6 answers
13.7k
13.7k views
GATE CSE 2014 | Set 2 | Question: 42
Consider the C function given below.int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; }Which one of the fol...
go_editor
13.7k
views
asked
Sep 28, 2014
Programming in C
gatecse-2014-set2
programming
programming-in-c
+
–
145
145 votes
10
answers
10 answers
68.3k
68.3k views
GATE CSE 2014 | Set 2 | Question: 34
For a C program accessing $\mathbf{X[i] [j] [k]}$, the following intermediate code is generated by a compiler. Assume that the size of an integer is $32$ bits and the siz...
go_editor
68.3k
views
asked
Sep 28, 2014
Compiler Design
gatecse-2014-set2
compiler-design
intermediate-code
programming-in-c
normal
+
–
224
224 votes
5
answers
5 answers
30.0k
30.0k views
GATE CSE 2014 | Set 2 | Question: 11
Suppose $n$ and $p$ are unsigned int variables in a C program. We wish to set $p$ to $^nC_3$. If $n$ is large, which one of the following statements is most likely to set...
go_editor
30.0k
views
asked
Sep 28, 2014
Programming in C
gatecse-2014-set2
programming
programming-in-c
normal
+
–
123
123 votes
8
answers
8 answers
32.4k
32.4k views
GATE CSE 2006 | Question: 57
Consider this C code to swap two integers and these five statements: the codevoid swap (int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; }S1: ...
Rucha Shelke
32.4k
views
asked
Sep 26, 2014
Programming in C
gatecse-2006
programming
programming-in-c
normal
pointers
+
–
101
101 votes
6
answers
6 answers
28.1k
28.1k views
GATE CSE 2014 | Set 1 | Question: 10
Consider the following program in C language:#include <stdio.h main() { int i; int*pi = &i; scanf("%d",pi); printf("%d\n", i+5); }Which one of the following statements is...
go_editor
28.1k
views
asked
Sep 26, 2014
Programming in C
gatecse-2014-set1
programming
programming-in-c
easy
pointers
+
–
82
82 votes
10
answers
10 answers
28.7k
28.7k views
GATE CSE 2005 | Question: 32
Consider the following C program:double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; }The above cod...
Kathleen
28.7k
views
asked
Sep 22, 2014
Programming in C
gatecse-2005
programming
programming-in-c
compiler-design
easy
+
–
61
61 votes
8
answers
8 answers
28.8k
28.8k views
GATE CSE 2005 | Question: 1, ISRO2017-55
What does the following C-statement declare?int (*f) (int * );A function that takes an integer pointer as argument and returns an integerA function that takes an integer ...
Kathleen
28.8k
views
asked
Sep 22, 2014
Programming in C
gatecse-2005
programming
programming-in-c
pointers
easy
isro2017
+
–
60
60 votes
4
answers
4 answers
22.4k
22.4k views
GATE CSE 2004 | Question: 33
Consider the following C program segment:char p[20]; int i; char* s = "string"; int length = strlen(s); for(i = 0; i < length; i++) p[i] = s[length-i]; printf("%s", p);Th...
Kathleen
22.4k
views
asked
Sep 18, 2014
Programming in C
gatecse-2004
programming
programming-in-c
strings
easy
+
–
49
49 votes
4
answers
4 answers
21.4k
21.4k views
GATE CSE 2004 | Question: 31, ISRO2008-40
Consider the following C function:int f(int n) { static int i = 1; if(n >= 5) return n; n = n+i; i++; return f(n); }The value returned by $f(1)$ is:$5$$6$$7$$8$
Kathleen
21.4k
views
asked
Sep 18, 2014
Programming in C
gatecse-2004
programming
programming-in-c
recursion
easy
isro2008
+
–
35
35 votes
5
answers
5 answers
20.3k
20.3k views
GATE CSE 2004 | Question: 2,ISRO2017-54
Consider the following functionvoid swap(int a, int b) { int temp; temp = a; a = b; b = temp; }In order to exchange the values of two variables $x$ and $y$.call $swap(x, ...
Kathleen
20.3k
views
asked
Sep 18, 2014
Compiler Design
gatecse-2004
compiler-design
programming-in-c
parameter-passing
easy
isro2017
runtime-environment
+
–
65
65 votes
6
answers
6 answers
20.3k
20.3k views
GATE CSE 2003 | Question: 89
Consider the C program shown below:#include<stdio.h #define print(x) printf("%d", x) int x; void Q(int z) { z+=x; print(z); } void P(int *y) { int x = *y + 2; Q(x); *y = ...
Kathleen
20.3k
views
asked
Sep 17, 2014
Programming in C
gatecse-2003
programming
programming-in-c
normal
pointers
+
–
117
117 votes
7
answers
7 answers
43.7k
43.7k views
GATE CSE 2003 | Question: 2
Assume the following C variable declaration:int *A[10], B[10][10];Of the following expressions:$A $$A [3]$$B $$B [3]$which will not give compile-time errors if used as le...
Kathleen
43.7k
views
asked
Sep 16, 2014
Programming in C
gatecse-2003
programming
programming-in-c
easy
pointers
+
–
59
59 votes
3
answers
3 answers
17.4k
17.4k views
GATE CSE 2002 | Question: 2.18
The C language is:A context free languageA context sensitive languageA regular languageParsable fully only by a Turing machine
Kathleen
17.4k
views
asked
Sep 15, 2014
Programming in C
gatecse-2002
programming
programming-in-c
normal
+
–
60
60 votes
8
answers
8 answers
39.1k
39.1k views
GATE CSE 2002 | Question: 2.8
Consider the following declaration of a two-dimensional array in C:char $a[100][100]$;Assuming that the main memory is byte-addressable and that the array is stored start...
Kathleen
39.1k
views
asked
Sep 15, 2014
Programming in C
gatecse-2002
programming-in-c
programming
array
easy
+
–
63
63 votes
2
answers
2 answers
14.9k
14.9k views
GATE CSE 2002 | Question: 1.17
In the C language:At most one activation record exists between the current activation record and the activation record for the mainThe number of activation records betwee...
Kathleen
14.9k
views
asked
Sep 15, 2014
Programming in C
gatecse-2002
programming
programming-in-c
easy
descriptive
+
–
99
99 votes
4
answers
4 answers
40.5k
40.5k views
GATE CSE 2001 | Question: 2.18
Consider the following three C functions:$[P1]$ int *g(void) { int x = 10; return (&x); }$[P2]$ int *g(void) { int *px; *px = 10; return px; }$[P3]$ int *g(void) { int *p...
Kathleen
40.5k
views
asked
Sep 14, 2014
Programming in C
gatecse-2001
programming
programming-in-c
normal
pointers
+
–
43
43 votes
6
answers
6 answers
21.1k
21.1k views
GATE CSE 2001 | Question: 2.17 | UGCNET-AUG2016-III: 21
What is printed by the print statements in the program $P1$ assuming call by reference parameter passing?Program P1() { x = 10; y = 3; func1(y,x,x); print x; print y; } f...
Kathleen
21.1k
views
asked
Sep 14, 2014
Programming in C
gatecse-2001
programming-in-c
parameter-passing
normal
ugcnetcse-aug2016-paper3
+
–
52
52 votes
6
answers
6 answers
21.4k
21.4k views
GATE CSE 2000 | Question: 2.20
The value of $j$ at the end of the execution of the following C program:int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i, j; ...
Kathleen
21.4k
views
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
+
–
81
81 votes
4
answers
4 answers
32.2k
32.2k views
GATE CSE 2000 | Question: 1.17, ISRO2015-79
Consider the following C declaration:struct { short x[5]; union { float y; long z; } u; )t;Assume that the objects of the type short, float and long occupy $2$ bytes, $4$...
Kathleen
32.2k
views
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
isro2015
union
+
–
79
79 votes
4
answers
4 answers
19.6k
19.6k views
GATE CSE 2000 | Question: 1.12
The most appropriate matching for the following pairs$$\begin{array}{|ll|ll|}\hline X: & \text{m = malloc(5); m = NULL;} & 1: & \text{using dangling pointers} \\\hline Y...
Kathleen
19.6k
views
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
match-the-following
pointers
+
–
60
60 votes
5
answers
5 answers
24.6k
24.6k views
GATE CSE 2000 | Question: 1.11
The following C declarations:struct node { int i: float j; }; struct node *s[10];define s to be:An array, each element of which is a pointer to a structure of type nodeA ...
Kathleen
24.6k
views
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
structure
+
–
49
49 votes
7
answers
7 answers
15.6k
15.6k views
GATE CSE 2008 | Question: 61
Choose the correct option to fill $?1$ and $?2$ so that the program below prints an input string in reverse order. Assume that the input string is terminated by a new lin...
Kathleen
15.6k
views
asked
Sep 12, 2014
Programming in C
gatecse-2008
programming
normal
programming-in-c
+
–
69
69 votes
6
answers
6 answers
26.6k
26.6k views
GATE CSE 2008 | Question: 60
What is printed by the following C program?int f(int x, int *py, int ppz) { int y, z; ppz += 1; z = ppz; // corrected z = *ppz; to z = ppz; *py += 2; y = *py; x += 3;...
Kathleen
26.6k
views
asked
Sep 12, 2014
Programming in C
gatecse-2008
programming
programming-in-c
normal
parameter-passing
+
–
41
41 votes
5
answers
5 answers
18.6k
18.6k views
GATE CSE 2008 | Question: 18
Which combination of the integer variables $x, y,$ and $z$ makes the variable $a$ get the value $4$ in the following expression?$$a=(x y)?((x z) ?x:z): ((y z) ?y:z)$$$...
Kathleen
18.6k
views
asked
Sep 11, 2014
Programming in C
gatecse-2008
programming
programming-in-c
easy
+
–
3
3 votes
2
2 answers
1.1k
1.1k views
what's the error here??
#include<stdio.h #define decode(s,t,a,m,p,e,d)m s u t #define begin decode(a,n,i,m,a,t,e) int begin() { printf("hello"); }
Manali Sikdar
1.1k
views
asked
Sep 7, 2014
Programming in C
programming
programming-in-c
+
–
Page:
« prev
1
...
80
81
82
83
84
85
86
next »