Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Most answered questions in Programming in C
2
votes
4
answers
61
ME-Hashing
KISHALAY DAS
832
views
KISHALAY DAS
asked
Nov 3, 2016
Programming in C
hashing
+
–
7
votes
4
answers
62
GATE Overflow | Programming | Test 1 | Question: 24
The output of the following C program will be (assume IEEE-754 floating point representation) #include <stdio.h> int main() { float a = 0.25; if(a == 0.25) printf("Hello"); printf(" World"); } Hello World World Compile Error Hello
The output of the following C program will be (assume IEEE-754 floating point representation)#include <stdio.h int main() { float a = 0.25; if(a == 0.25) printf("Hello");...
Arjun
3.1k
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
+
–
6
votes
4
answers
63
GATE Overflow | Programming | Test 1 | Question: 22
Which one among the following definitions of string str could cause problem when passed as the first argument to printf function? char str[] = "Hello World"; char str[12] = "Hello World"; char *str = " ... ,'l','o',' ','W','o','r','l','d'};
Which one among the following definitions of string str could cause problem when passed as the first argument to printf function?char str[] = "Hello World";char str[12] =...
Arjun
1.8k
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
+
–
3
votes
4
answers
64
GATE Overflow | Programming | Test 1 | Question: 26
What will be the output of the following code? #include <stdio.h> int main() { char a = 'A', z = 'Z'; printf("%d", z-a); }
What will be the output of the following code?#include <stdio.h int main() { char a = 'A', z = 'Z'; printf("%d", z-a); }
Arjun
831
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
numerical-answers
+
–
11
votes
4
answers
65
GATE Overflow | Programming | Test 1 | Question: 15
Which of the following statements produce a compile time error in C? int a = sizeof 3; *(1000) = 5; int a = 5; ((int)a)++; int b = 5, *a = &b; ((int*)a)++; 1, 2 and 3 2 only 2, 3 and 4 All 4
Which of the following statements produce a compile time error in C?int a = sizeof 3;*(1000) = 5;int a = 5; ((int)a)++;int b = 5, *a = &b; ((int*)a)++;1, 2 and 32 only2, ...
Arjun
2.2k
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
+
–
5
votes
4
answers
66
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; }
What will be returned by the following function foo when called as foo(10)?int foo(int n) { return n & n | 1; }
Arjun
1.4k
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
numerical-answers
bitwise
+
–
6
votes
4
answers
67
DSA
a 4-ary tree has either 4 or 0 children,What is the total number of nodes when there are 20 leaf node?
a 4-ary tree has either 4 or 0 children,What is the total number of nodes when there are 20 leaf node?
Aboveallplayer
2.1k
views
Aboveallplayer
asked
Sep 3, 2016
Programming in C
tree
+
–
6
votes
4
answers
68
C Program
#include<stdio.h> int main() { char *s[] = { "knowledge","is","power"}; char **p; p = s; printf("%s ", ++*p); printf("%s ", *p++); printf("%s ", ++*p); return 0; }
#include<stdio.h int main() { char *s[] = { "knowledge","is","power"}; char p; p = s; printf("%s ", ++*p); printf("%s ", *p++); printf("%s ", ++*p); return 0; }
srestha
3.7k
views
srestha
asked
Aug 17, 2016
Programming in C
programming-in-c
+
–
1
votes
4
answers
69
What Value Function Return ?
Consider the following C function: int f(int n) { static int r = 0; If (n < = 0) return 1; If (n > 3) { r = n; return f (n – 2) + 2; } return f(n – 1) + r; } What is the value of f(5)? (A) 3 (B) 7 (C) 9 (D) 18
Consider the following C function: int f(int n) { static int r = 0; If (n < = 0) r...
dhairya
2.6k
views
dhairya
asked
Jul 12, 2016
Programming in C
programming-in-c
functions
+
–
4
votes
4
answers
70
ISRO2016-20
What is the output of this C code? #include<stdio.h> void main() { int k=5; int *p=&k; int **m=&p; printf("%d %d %d",k,*p,**m); } 5 5 5 5 5 junk 5 junk junk compile time error
What is the output of this C code?#include<stdio.h void main() { int k=5; int *p=&k; int m=&p; printf("%d %d %d",k,*p, m); }5 5 5 5 5 junk5 junk junkcompile time error
sourav.
4.1k
views
sourav.
asked
Jul 3, 2016
Programming in C
programming-in-c
pointers
isro2016
+
–
2
votes
4
answers
71
ISRO2014-47
The following three 'C' language statements is equivalent to which single statement? y=y+1; z=x+y; x=x+1 z = x + y + 2; z = (x++) + (++y); z = (x++) + (y++); z = (x++) + (++y) + 1;
The following three 'C' language statements is equivalent to which single statement?y=y+1; z=x+y; x=x+1z = x + y + 2;z = (x++) + (++y);z = (x++) + (y++);z = (x++) + (++y)...
jenny101
5.0k
views
jenny101
asked
Jun 25, 2016
Programming in C
isro2014
programming-in-c
+
–
10
votes
4
answers
72
ISRO2015-73
The output of the following program is main() { static int x[] = {1,2,3,4,5,6,7,8} int i; for (i=2; i<6; ++i) x[x[i]]=x[i]; for (i=0; i<8; ++i) printf("%d", x[i]); } 1 2 3 3 5 5 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1 1 2 3 5 4 6 7 8
The output of the following program ismain() { static int x[] = {1,2,3,4,5,6,7,8} int i; for (i=2; i<6; ++i) x[x[i]]=x[i]; for (i=0; i<8; ++i) printf("%d", x[i]); }1 2 3 ...
go_editor
9.6k
views
go_editor
asked
Jun 21, 2016
Programming in C
isro2015
programming-in-c
loop
output
+
–
5
votes
4
answers
73
ISRO2007-57
Which of the following programming language(s) provides garbage collection automatically Lisp C++ Fortan C
Which of the following programming language(s) provides garbage collection automaticallyLispC++FortanC
go_editor
4.0k
views
go_editor
asked
Jun 10, 2016
Programming in C
isro2007
programming
runtime-environment
+
–
0
votes
4
answers
74
If a= 10 then what will be the value of b in a C language code
If a= 10 then what will be the value of b in a C language code . If b= a++ + a++ + a++; . 30. 23. 33. Undefined behaviour
If a= 10 then what will be the value of b in a C language code.If b= a++ + a++ + a++;.30.23.33.Undefined behaviour
Sanjay Sharma
2.1k
views
Sanjay Sharma
asked
Jun 7, 2016
Programming in C
programming-in-c
undefined-behaviour
+
–
8
votes
4
answers
75
ISRO-2013-63
Consider the following $C$ code. #include <stdio.h> #include <math.h> void main () { double pi = 3.1415926535; int a = 1; int i; for (i=0; i < 3; i++) if (a = cos(pi * i/2)) printf("% d", 1); else printf("%d", 0); } What would the program print? $000$ $010$ $101$ $111$
Consider the following $C$ code.#include <stdio.h #include <math.h void main () { double pi = 3.1415926535; int a = 1; int i; for (i=0; i < 3; i++) if (a = cos(pi * i/2))...
makhdoom ghaya
6.4k
views
makhdoom ghaya
asked
May 5, 2016
Programming in C
isro2013
programming-in-c
identify-function
output
+
–
46
votes
4
answers
76
GATE CSE 2012 | Question: 49
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); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += ++b ... $\begin{array}{ll} \text{4} & \text{2} \\ \text{4} & \text{2} \\ \text{2} & \text{0} \\ \end{array}$
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, ...
go_editor
10.3k
views
go_editor
asked
Apr 21, 2016
Programming in C
normal
gatecse-2012
programming-in-c
programming
+
–
0
votes
4
answers
77
output of this program is
int main(){ int n=1,sum =0; while(n<=10){ sum += n++*n++; } printf("Sum = %d\n",sum); return 0 } ans is 165 . i got 190.please explain??
int main(){ int n=1,sum =0; while(n<=10){ sum += n++*n++; } printf("Sum = %d\n",sum); return 0 }ans is 165 . i got 190.please explain??
indrajeet
1.1k
views
indrajeet
asked
Feb 3, 2016
Programming in C
programming-in-c
+
–
4
votes
4
answers
78
Static Scoping | Dynamic Scoping: GATE 1989
Indicate results of the following program if the language uses i)Static scope rule and ii) Dynamic scope rules (GATE-1989) var x,y:integer; procedure A(var z:integer); var x:integer; begin x:=1; B; z:=x; end; procedure B; begin x:=x+1; end; begin x:=5; A(y); write(y) end;
Indicate results of the following program if the language usesi)Static scope rule andii) Dynamic scope rules (GATE-1989)var x,y:integer;procedure A(var z:integer);var x:i...
Aspi R Osa
1.9k
views
Aspi R Osa
asked
Dec 10, 2015
8
votes
4
answers
79
ISICAL MTech 2014 CS
How many asterisks $(*)$ in terms of $k$ will be printed by the following C function, when called as $\text{count}(m)$ where $m = 3^k \ ?$ Justify your answer. Assume that $4$ bytes are used to store an integer in C and $k$ is such that $3^k$ can be stored in $4$ bytes. void count(int n){ printf("*"); if(n>1){ count(n/3); count(n/3); count(n/3); } }
How many asterisks $(*)$ in terms of $k$ will be printed by the following C function, when called as $\text{count}(m)$ where $m = 3^k \ ?$ Justify your answer.Assume that...
Vikranth Inti
1.6k
views
Vikranth Inti
asked
Nov 23, 2015
Programming in C
programming-in-c
recursion
isi2014
+
–
4
votes
4
answers
80
ISRO2015-74
Which of the following has the compilation error in C? int n = 17; char c = 99; float f = (float)99.32; #include <stdio.h>
Which of the following has the compilation error in C?int n = 17;char c = 99;float f = (float)99.32;#include <stdio.h>
Nisha kumari
7.0k
views
Nisha kumari
asked
Oct 15, 2015
Programming in C
programming-in-c
isro2015
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
206
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register