Skip to main content

Posts

Showing posts from August, 2018

C++ sizeof Operator

    #include <iostream> using namespace std ; int main () { cout << "Size of char : " << sizeof ( char ) << endl ; cout << "Size of int : " << sizeof ( int ) << endl ; cout << "Size of short int : " << sizeof ( short int ) << endl ; cout << "Size of long int : " << sizeof ( long int ) << endl ; cout << "Size of float : " << sizeof ( float ) << endl ; cout << "Size of double : " << sizeof ( double ) << endl ; cout << "Size of wchar_t : " << sizeof ( wchar_t ) << endl ; return 0 ; }     command sizeof ( ***** )       output

what is difference between signed integers and unsigned integers

  difference between signed integers and unsigned integers         A signed integer is one with either a plus or minus sign in front. That is it can be either positive or negative. An unsigned integer is assumed to be positive . This is important in computing because the numbers are stored (usually) as a fixed number of binary digits. For a signed integer one bit is used to indicate the sign - 1 for negative, zero for positive. Thus a 16 bit signed integer only has 15 bits for data whereas a 16 bit unsigned integer has all 16 bits available. This means unsigned integers can have a value twice as high as signed integers (but only positive values). On 16 bit computers this was significant, since it translates to the difference between a maximum value of ~32,000 or ~65,000. On 32 bit computers its far less signifocant since we get 2 billion or 4 billion. And on 64 bit computers it becomes of academic interest.    

File "./setup.py", line 4, in from setuptools import setup ModuleNotFoundError: No module named 'setuptools'

Traceback (most recent call last):   File "./setup.py", line 4, in <module>     from setuptools import setup ModuleNotFoundError: No module named 'setuptools' FIX- Distribute has been merged with setuptools 0.7, so just get setuptools for both Python 2.7 and 3.x To install this on Debian: sudo apt - get install python - setuptools For Python 3.x sudo apt - get install python3 - setuptools       If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version: On Linux or OS X: pip install - U pip setuptools On Windows: python - m pip install - U pip setuptools

During startup program exited with code 127 - GDB TOOL [FIXED]

  Cannot exec During startup program exited with code 127 - GDB TOOL [FIXED] root@kali:~/Desktop# gdb main GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from main...done. (gdb) r Starti...