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
Recent questions tagged undefined-behaviour
0
votes
0
answers
1
Self Doubt [Sequence point]
from Dennis Ritchie “a[i] = i++ The question is whether the subscript is the old value of i or the new value “ My doubt: we already know ‘ ++ ’ has higher precedence than ‘ = ’.S as it is post increment value of i will be incremented after use hence it should be like a[i] = i; i++; How it creates ambiguity...i iran it on compiler and ran as i mentioned
jatin khachane 1
asked
in
Programming in C
Dec 16, 2018
by
jatin khachane 1
229
views
programming-in-c
undefined-behaviour
1
vote
2
answers
2
Gate CS
#include<stdio.h> int main() { int x, y = 7; x = ++y + ++y + y--; printf("%d\n", x); return 0; } What is the output of this code snippet ? A. 27 B. 26 C. 25 D. Compilation error
Abhisek Saha
asked
in
Programming in C
Aug 31, 2018
by
Abhisek Saha
644
views
programming-in-c
undefined-behaviour
0
votes
1
answer
3
What is output of following program
It is not any gate question but just my doubt over the topic C programming? Ques:- What will be the output of the following program? void main(){ int a=0,x=0; a = 10; x = ++a + ++a + ++a; printf("Value of X = ... } What will be the output of the above program? Please give explanation also for your answer. (Please tell what was your approach in this answer)
kislaya Pant
asked
in
Programming in C
Jun 17, 2018
by
kislaya Pant
1.4k
views
programming-in-c
programming
undefined-behaviour
bad-question
0
votes
2
answers
4
UGC NET CSE | June 2009 | Part 2 | Question: 15
What is the value of $‘b’$ after the execution of the following code statements : $C=10;$ $B=++c + ++c;$ $20$ $22$ $23$ None
rishu_darkshadow
asked
in
Programming in C
Sep 22, 2017
by
rishu_darkshadow
1.7k
views
ugcnetcse-june2009-paper2
programming-in-c
undefined-behaviour
bad-question
8
votes
1
answer
5
float vs double
Program 1: #include<stdio.h> int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); } The output of above program is ELSE IF . Program ... getting these weird output and is there any way to predict these outputs on the same processor. Also how comparison is done of two variables in C ?
ManojK
asked
in
Programming in C
Mar 10, 2017
by
ManojK
5.6k
views
programming-in-c
ieee-representation
undefined-behaviour
1
vote
0
answers
6
Sequence Points in C and Undefined Behaviour
What are sequence Points ....? A sequence point defines any point in a computer program's execution at which it is guaranteed that all side effects of previous evaluations will have been performed, and no side effects from subsequent evaluations have yet been ... statement ? If so explain how it is done printf("%d , %d , %d ",i++,i,++i);
PEKKA
asked
in
Programming in C
Nov 18, 2016
by
PEKKA
592
views
programming-in-c
undefined-behaviour
non-gate
1
vote
2
answers
7
c++ program
Sanjay Sharma
asked
in
Programming in C
Nov 17, 2016
by
Sanjay Sharma
859
views
non-gate
undefined-behaviour
0
votes
1
answer
8
c program
#include<stdio.h> int main() { char *p1="xyz"; char *p2="xyz"; if(p1==p2) printf("equal"); else printf("unequal"); } Output is equal how??? please explain
Ankush Tiwari
asked
in
Programming in C
Aug 20, 2016
by
Ankush Tiwari
467
views
programming-in-c
undefined-behaviour
non-gate
1
vote
1
answer
9
What is the Output?
#include<stdio.h> int main() { int a = 10, b = 20, c = 30, d = 40; printf("%d%d%d",a, b, c); printf("%d%d%d", d); return 0; } What is the Output and when I run it I am getting some wierd answer. Please explain ?
Prajwal Bhat
asked
in
Programming in C
Aug 19, 2016
by
Prajwal Bhat
1.1k
views
programming-in-c
undefined-behaviour
output
non-gate
2
votes
1
answer
10
c program
#include<stdio.h> #include<stdlib.h> int main() { int p=9; printf("%d %d",p++,++p); } how it executed and also how printf function executed left to right or right to left?
Registered user 7
asked
in
Programming in C
Aug 19, 2016
by
Registered user 7
542
views
programming-in-c
undefined-behaviour
non-gate
1
vote
1
answer
11
C Program
#include<stdio.h> #define CUBE(x) (x*x*x) int main() { int a, b=3; a = CUBE(b++); printf("%d, %d ", a, b); return 0; } Why this give 27,6 as output?
komal07
asked
in
Programming in C
Aug 18, 2016
by
komal07
1.0k
views
programming-in-c
undefined-behaviour
non-gate
21
votes
1
answer
12
Undefined Behaviour in C
What will be the output of the following code? #include<stdio.h> int main() { int x=10, y; y = (x++) + (++x); printf("%d %d %d %d ", y, x++, x, ++x); } 22,10,11,13 22,11,11,11 12,10,11,13 22 13 13 13
Arjun
asked
in
Programming in C
Aug 8, 2016
by
Arjun
8.1k
views
programming-in-c
output
undefined-behaviour
non-gate
13
votes
8
answers
13
ISRO2015-69
If n has 3, then the statement a[++n]=n++; assigns 3 to a[5] assigns 4 to a[5] assigns 4 to a[4] what is assigned is compiler dependent
milankamilya
asked
in
Programming in C
Jun 14, 2016
by
milankamilya
8.5k
views
isro2015
programming-in-c
non-gate
undefined-behaviour
0
votes
4
answers
14
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
Sanjay Sharma
asked
in
Programming in C
Jun 7, 2016
by
Sanjay Sharma
1.9k
views
programming-in-c
undefined-behaviour
To see more, click for the
full list of questions
or
popular tags
.
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)
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 tagged undefined-behaviour
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:...