Viva la pace!
Users > WebHome4435dda > DanieleCocca
TWiki webs: Users | TWiki | Sandbox   Log In or Register

Home | Users | Groups | Changes | Index | NotificaAutomatica | Search | Go

Test della mia home

#include <stdio.h>

int find_first_active_bit(unsigned int n)
{
  int p = 0;

  n &= -n;
  if (n & 0xAAAAAAAA) p += 1;
  if (n & 0xCCCCCCCC) p += 2;
  if (n & 0xF0F0F0F0) p += 4;
  if (n & 0xFF00FF00) p += 8;
  if (n & 0xFFFF0000) p += 16;
  return p;
}

int main()
{
  int n;

  printf("Inserisci un numero: ");
  scanf("%d", &n);

  printf("Indice del bit meno significativo impostato ad 1: %d.\n", find_first_active_bit(n));
  return 0;
}

wxDev-C++

Se a lezione vi consigliano di usare Dev-C++ come IDE per Windows, prendete in considerazione il fatto che ormai si tratta di un progetto pressoché morto (sono due anni che non c'è una nuova release). Dalle sue ceneri è nato wxDev-C++, che è più completo e sicuramente più seguito, quindi è certamente una scelta migliore.

Variabili globali e stili per il TWiki

  • Set SKIN = quickmenu
I Attachment History Action Size Date Who CommentSorted ascending
Compressed Zip archivezip modulo1.zip r1 manage 15.6 K 2008-04-07 - 10:46 DanieleCocca  
Unknown file formatcvs Makefile.cvs r1 manage 0.1 K 2008-04-07 - 10:28 DanieleCocca prova
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions


Parents: WebHome4435dda
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback