Questions tagged [unsigned]

An unsigned variable is a variable that can only represent non-negative numbers.

An unsigned variable is a variable that can only represent non-negative numbers, as opposed to a signed variable which can represent both positive and negative numbers.

1251 questions
-6
votes
2 answers

Save an unsigned char vector one by one

#include "stdafx.h" #include "Compiler.h" #include int main() { std::ofstream output("file.bin", std::ios::binary | std::ios::trunc); if(output.fail()) { return 1; } std::vector f =…
Teytix
  • 85
  • 1
  • 4
  • 10
-6
votes
3 answers

C - is any use of unsigned int just terrible coding practice?

Are there any examples of legitimately good use of an unsigned data (i.e. unsigned int) or should use of unsigned data types just be considered very bad coding practice as a relic of resource impaired platforms from the 1970s and 1980s? Consider…
B. Nadolson
  • 2,988
  • 2
  • 20
  • 27
-7
votes
2 answers

Why does my program repeat forever instead of giving the maximum integer value?

I am currently learning C, and I made a program that I thought would give me the maximum integer value, but it just loops forever. I can't find an answer as to why it won't end. #include int main() { unsigned int i = 0; signed int…
-7
votes
1 answer

C data types real life example

I am new to programming. While i'm browsing for datatypes i found many data types,i understood all the other data types except signed and unsigned data types. can any one help me by giving real life examples for using signed,unsigned…
Pleotex
  • 42
  • 9
-9
votes
3 answers

Any documentaion available for behaviour of unsigned char pointer in C?

What is an unsigned char pointer and how is it different from a char pointer in C? Not much information on unsigned char pointer in C , and How to print the data pointed by an unsigned char pointer? Any explanation on this will be helpful.
-9
votes
3 answers

What does this piece of code do and what does each of the symbols used mean? The language used is C and I am just a beginner to coding

Came across a code of which I couldn't understand what these two lines are doing. Can't even get the syntax. Please specify what type of functionalities have been used like for eg I am guessing that there has been a use of conditional operators in…
Ankit Gupta
  • 99
  • 2
  • 5
1 2 3
83
84