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
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Recent questions in Programming and DS
0
votes
2
answers
4841
Programming \ what is the output?
#include<stdio.h> int main() { int a[10][20][30]={0}; printf("%ld",&a+1 - &a); return 0; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
1.6k
views
programming-in-c
output
interview
array
0
votes
1
answer
4842
Prog \ What is the output of this program?
#include<stdio.h> int main() { int a[10][20][30] = {0}; int *b = a; int *c = a+1; printf("%ld", c-b); return 0; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
788
views
programming-in-c
pointers
0
votes
2
answers
4843
Programming \ What is the output of this Program ?
Prog 1 : #include<stdio.h> #include<string.h> void foo(char *); int main() { char a[100] = {0}; printf("%lu %lu",sizeof(a),strlen(a)); return 0; } Prog 2 #include<stdio.h> #include<string.h> int main() { char string[] = "Hello"; printf("%lu %lu",sizeof(string),strlen(string)); return 0; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
1.9k
views
programming-in-c
output
interview
0
votes
1
answer
4844
Programming \ predict the output
#include<stdio.h> int main() { char str[] = {'a','b','c','\0'}; str[0] -= 32; printf("%s",str); return 0; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
461
views
programming-in-c
output
interview
0
votes
2
answers
4845
What does the following function do?
int foo( int a, int b) { int c = a-b; c = c&(0x80000000); return (!c)*a +(!!c)*b; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
818
views
programming-in-c
interview
0
votes
0
answers
4846
Programming \What is the following function doing ?
unsigned fun(unsigned int a) { unsigned int i, x = 0, y = 0, z = 0; for(i = 0; i < 16; i++) { y <<= 2; y += !!(a & 0x80000000) << 1; y += !!(a & 0x40000000); a <<= 2; x = x + (x&1); x <<= 1; z <<= 1; if(x + 1 <= y) { x++; z++; y-=x; } } return z; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
447
views
programming-in-c
interview
0
votes
0
answers
4847
What is the following function doing?
unsigned fun(unsigned a, unsigned b) { int i; unsigned j = 0; for(i = 0; i < 32; i++) { j <<= 1; j += !!(a & 0x80000000); a <<= 1; if(j >=b) { j -= b; a++; } } return a; }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
549
views
programming-in-c
0
votes
1
answer
4848
C programming/ predict the output
main() { int c=- -2; printf("c=%d",c); }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
998
views
programming-in-c
output
0
votes
2
answers
4849
C programming\ predict the output
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
1.3k
views
programming-in-c
output
0
votes
1
answer
4850
C programming\ predict the output
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
774
views
programming-in-c
pointers
output
0
votes
1
answer
4851
While
In while loop semicolon at the end of while create infinite loop But in do while(); semicolon at the end of while don't create infinite loop.actually it is correct syntax for do while why?
Sourabh Kumar
asked
in
Programming in C
May 16, 2016
by
Sourabh Kumar
438
views
programming
0
votes
0
answers
4852
Type promotion
Sourabh Kumar
asked
in
Programming in C
May 16, 2016
by
Sourabh Kumar
147
views
programming-in-c
0
votes
0
answers
4853
Pgee2016
When in simple c program I write only 3 lines it successfully compiled these 3 lines are: 12334; 'A'; "Abbdv"; But when I edit this program and try some different then it will give compilation error {'A','b','b','d','v','\0'}; {1,2,3,4}; Why it happens in turboc compiler
Sourabh Kumar
asked
in
Programming in C
May 16, 2016
by
Sourabh Kumar
217
views
programming
0
votes
2
answers
4854
difference bw declerations
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
asu
asked
in
Programming in C
May 15, 2016
by
asu
240
views
0
votes
1
answer
4855
output of this c code
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
asu
asked
in
Programming in C
May 15, 2016
by
asu
780
views
0
votes
2
answers
4856
Is the following code legal?
void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
Desert_Warrior
asked
in
Programming in C
May 15, 2016
by
Desert_Warrior
642
views
programming-in-c
test-series
0
votes
1
answer
4857
C programming \ predict the ouptput
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
Desert_Warrior
asked
in
Programming in C
May 15, 2016
by
Desert_Warrior
655
views
programming-in-c
pointers
0
votes
2
answers
4858
post order
the number of binary trees with 3 nodes which when traversed in post order gives the sequence a,b,c is a)3 b)9 c)7 d)5
Sanjay Sharma
asked
in
Programming in C
May 14, 2016
by
Sanjay Sharma
9.0k
views
0
votes
1
answer
4859
expression
the expression 1*2^3*4^5*6 will be evaluated as a)32^30 b)162^30 c)49152 d)173458
Sanjay Sharma
asked
in
Programming in C
May 14, 2016
by
Sanjay Sharma
4.6k
views
1
vote
1
answer
4860
AVL tree
minimum no of nodes n AVL tree of height 11 is a)230 b)231 c)232 c)233
Sanjay Sharma
asked
in
Programming in C
May 14, 2016
by
Sanjay Sharma
2.9k
views
avl-tree
Page:
« prev
1
...
238
239
240
241
242
243
244
245
246
247
248
...
309
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)
Programming
(4.1k)
DS
(2.0k)
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 in Programming and DS
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:...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow