Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the output of this C code?
Home
C Plus Plus
What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
(
515
points)
What is the output of this C code?
#include <stdio.h>
int main()
{
int i = 3;
int l = i / -2;
int k = i % -2;
printf("%d %d\n", l, k);
return 0;
}
a.Compile time error
b.1 -1
c.Implementation defined
d.-1 1
#c
language
Please
log in
or
register
to answer this question.
0
Answers
Related questions
+1
vote
Q: What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
(
515
points)
#c
language
+1
vote
Q: What is the output of this C code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
(
515
points)
#c
language
+1
vote
Q: What is the final value of j in the below code?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
(
515
points)
#c
language
+1
vote
Q: Which data type is most suitable for storing a number 65000 in a 32-bit system?
asked
Jun 13, 2019
in
C Plus Plus
by
Derya
(
515
points)
#c
language
0
votes
Q: What is wrong with this code?
asked
Jun 11, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-code
#c-code
+2
votes
Q: Which type of memory is used by an Array in C++ programming language?
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
(
32.2k
points)
#c
-array
#array
+1
vote
Q: For inserting a new line in C++ program, which one of the following statements can be used?
asked
Jan 20, 2021
in
C Plus Plus
by
SakshiSharma
(
32.2k
points)
#c
-new-line
new-line-character
0
votes
Q: List the types of inheritance supported in C++.
asked
Jun 18, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-inheritance
0
votes
Q: What is Exception Handling? Does C++ support Exception Handling?
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-exception-handling
#exception-handling
#support-exeption-handling
0
votes
Q: What is a template in C++
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-template
#template
0
votes
Q: What is Polymorphism in C++
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-polymorphism
#polymorphism-c
0
votes
Q: Does C++ support Multilevel and Multiple Inheritances?
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-multilevel-inheritance
-multiple-inheritance
0
votes
Q: What is Inheritance in C++
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#inheritance-c
#c
-inheritance
0
votes
Q: What is the difference between Method Overloading and Method Overriding in C++?
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#c
-method-overloading
#method-overloading
#method-overriding
0
votes
Q: Explain the Static Member Function in C++
asked
Jun 15, 2020
in
C Plus Plus
by
Robindeniel
(
20.8k
points)
#static-member-function-c
#c
-static-member-function
...