online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> // Type your code here, or load an example. unsigned long long convert1(char endian[8]) { unsigned long long temp = endian[0]; temp += (unsigned long long)endian[1]<<8; temp += (unsigned long long)endian[2]<<16; temp += (unsigned long long)endian[3]<<24; temp += (unsigned long long)endian[4]<<32; temp += (unsigned long long)endian[5]<<40; temp += (unsigned long long)endian[6]<<48; temp += (unsigned long long)endian[7]<<56; return temp; } unsigned long long convert2(char endian[8]) { /* little endian assumed */ return *(unsigned long long *)endian; } int main() { char test[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; printf("Hello World\n"); printf("0x%llx\n", convert1(test)); printf("0x%llx\n", convert2(test)); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



Program is not being debugged. Click "Debug" button to start program in debug mode.

  • {user}