Puppy Linux Discussion Forum
Puppy HOME page :
puppylinux.com
"THE" alternative forum :
puppylinux.info
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
The time now is Tue 18 Jun 2013, 22:26
All times are UTC - 4
Forum index
»
Off-Topic Area
»
Programming
Free cloud compiling at sourceLair.com
View_previous_topic
::
View_next_topic
Page 1 of 1
Posts_count
Author
Message
dennis-slacko531
Joined: 18 Jan 2012
Posts: 78
Location: Oregon
Posted: Thu 21 Jun 2012, 01:56
Post_subject:
Free cloud compiling at sourceLair.com
Sub_title: Here's a 'C' snippet to try now.
You Gotta try this...
Site is in beta but works in browsers. Android App available too.
http://www.sourceLair.com
This is a SORT example and here's the output:
Before shellsort: 83 86 77 15 93 35 86 92 49 21
After shellsort: 15 21 35 49 77 83 86 86 92 93
Try this or your own code, of course...
#include <stdio.h>
#define MAXARRAY 10
void shellsort(int a[], int total, int index);
int main(void) {
int array[MAXARRAY] = {0};
int i = 0;
/* load some random values into the array */
for(i = 0; i < MAXARRAY; i++)
array[i] = rand() % 100;
/* print the original array */
printf("Before shellsort: ");
for(i = 0; i < MAXARRAY; i++) {
printf(" %d ", array[i]);
}
printf("\n");
shellsort(array, MAXARRAY, 1);
/* print the `shellsorted' array */
printf("After shellsort: ");
for(i = 0; i < MAXARRAY; i++) {
printf(" %d ", array[i]);
}
printf("\n");
return 0;
}
void shellsort(int a[], int total, int index) {
int i = 0;
int j = 0;
int k = 0;
int l = 0;
for(k = 0; k < index; k++) {
for(i = k; i < total; i += index) {
l = a[i];
for(j = (i - index); j >= 0; j -= index) {
if(a[j] > l)
a[j + index] = a[j];
else
break;
}
a[j + index] = l;
}
}
return;
}
Acknowledgement for the code goes to Fahad Uddin --
http://www.mycsnippets.blogspot.com/search/label/sorting
Back to top
Ibidem
Joined: 25 May 2010
Posts: 257
Posted: Sun 24 Jun 2012, 19:37
Post_subject: Other sites too...
http://ellcc.org/demo
also has an online C compiler, though it just makes an ASM listing.
(ellcc is LLVM/Clang for embedded work)
Back to top
Display_posts:
All_Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Sort by:
Post Time
Post Subject
Author
Ascending
Descending
Page 1 of 1
Posts_count
View_previous_topic
::
View_next_topic
Forum index
»
Off-Topic Area
»
Programming
Jump to:
Select a forum
-------------------
Forum index
|___ House Training
| |___ Beginners Help ( Start Here)
| |___ Users ( For the regulars )
| | |___ Usuarios de habla Hispana
| | |___ Für deutschsprachige Anhänger
| | |___ Pour les francophones
| |
| |___ HOWTO ( Solutions )
| |___ Bugs ( Submit bugs )
|
|___ Advanced Topics
| |___ Additional Software (PETs, n' stuff)
| | |___ Package Collections / Repositories
| | |___ REQUESTS
| | |___ Browsers and Internet
| | |___ Business
| | |___ Compiling
| | |___ Desktop
| | |___ Documents
| | |___ Drivers
| | |___ Educational
| | |___ Engineering/Science/Simulation
| | |___ Eye Candy
| | |___ Filesystem
| | |___ Games
| | |___ Graphics
| | |___ Multimedia
| | |___ Network
| | |___ Security/Privacy
| | |___ System
| | |___ Utilities
| | |___ Virtualization
| | |___ Unsorted
| |
| |___ Cutting edge
| | |___ Multi-session live-CD/DVD
| |
| |___ Hardware
| | |___ Audio
| | |___ Networking
| | | |___ Dialup
| | | |___ Ethernet
| | | |___ Wireless
| | |
| | |___ Printers
| | |___ Video
| |
| |___ Puppy Derivatives
| |___ Puppy Projects
| |___ Next Puppy Development
| | |___ 4.x
| | | |___ Bugs (4.x dev)
| | | |___ Usability Issues (4.x dev)
| | |
| | |___ 5.x
| | |___ Bugs (5.x dev)
| | |___ Usability Issues (5.x dev)
| |
| |___ Localization Project
| |___ Documentation Project
|
|___ Taking the Puppy out for a walk
| |___ Announcements
| |___ Puppy Power
| |___ Suggestions
| |___ Misc
|
|___ Off-Topic Area
|___ Programming
|___ Security
Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You
cannot
attach files in this forum
You
can
download files in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group
[ Time: 0.0440s ][ Queries: 11 (0.0128s) ][ GZIP on ]