473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Small doubt

The expression x=4+2 % -8 evaluates to 6!!! How?
Feb 11 '17 #1
1 1074
weaknessforcats
9,208 Expert Mod 8TB
It's 4+2 which is 6 then 6 % -8 which is 6.

BTW: the - is ignored. modulo numbers have no sign.
Feb 11 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SandyIsCool | last post by:
Hi I used the below code for an image button image1.imageurl="~/images/image1.jpg"; image1.imageurl=Page.ResolveUrl("~/images/image1.jpg"); Both statements work fine..
1
seshu
by: seshu | last post by:
i have a data grid with eight columns now i want all the data in my data grid to center to there cells ie text alighnment in cell to be center to the cell and one more thing is my data grids first...
1
by: charitra | last post by:
main() inspite of being static can call other non static functions.How come?
1
by: GeezerButler | last post by:
According to msdn, this method throws XmlException when "There is a load or parse error in the XML. In this case, the document remains empty." I cannot understand the difference between load...
4
by: ajaygargnsit | last post by:
Hi I am clear about the nuisances about ptrdiff_t. There is just one thing that I need to know : Suppose we need to display the value of an object (say 'x') of ptrdiff_t. Then what format...
9
by: yashu21985 | last post by:
Why won't this code compile? #include <iostream.h> void Print(int i); void Print(float f, int skip = 0); void main() { Print(3.3); } void Print(int i) {
2
by: koti688 | last post by:
I have two files like below. 1st file : mail.pl #!/usr/bin/perl use DBD::mysql; use DBI; use Utils::DBClass; $object = new DBClass( "perltest", "localhost", 3306, "root", "sierra");
2
by: srinivas reddy | last post by:
The above code is working fine,first am entering the three students data after am closing my console,again am open my console entered again three students data , if am reading all students data am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.