#c code
Explore tagged Tumblr posts
onewedata · 1 year ago
Text
Tumblr media
© С-соᴅе ♡ do not edit or crop logo.
11 notes · View notes
theoisgoneagain · 2 years ago
Text
C Basics
I'm bored
C-code Basics
Just the basics of C
Every command ends with semi-colon => ;
Starting point of the program
int main() {   }
int main(void) {}
Ending the program
return 0; }
Libraries
#include <library>
stdlib.h = standard library
stdio.h = input/output library
math.h = for maths
array.h = you won't need here, but it's good to know that it exists
print word
printf("enter letters here\n");
\n = new line
user input (number)
float = ex. 23.455
float n;
scanf("%f", &n);
int = ex. 23
int n;
scanf("%i", &n); 
char = symbols, letters
char n;
scanf("%c", &n); (only one letter input!)
char = %c
int = %i, %d
float = %f
|| = or
&& = and
Loops
do... while
do {code block} while (condition)
while
while( condition) {code block}
for
for( start point; end point; counter) {code block}
example
do... while
do {
printf("do you want to repeat this block?\n");
scanf("%c" &n);
} while( n = 'y' || n = 'Y');
while
while(n<12){
printf("Please enter your number\n");
scanf("%i", &n);}
for
(i++ = i+1)
for(int i=0; i<n; i++) {  printf("my number is %i", i);  }
 if
if( condition) {block}
else if(condition 2) {block 2}
else {block 3}
ex.
if(n < 0) { printf("%f is <0", n); }
else if( n >0) {printf("%f is >0",n); }
else {printf("%f = 0",n); }
Program Example
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int age;
float number, favnumb;
char letter; 
do {
printf("Please enter your age");
scanf("%i",&age);
while(age <0) {
printf("\nError age must be bigger or equal to 0\n please enter age");
scanf("%i",&age); }
printf("\nwhat is your favourite number?\n");
scanf("%f", &favnumb); 
printf("\n do you want to repeat the process?");
scanf("%c", &letter);
if(letter == 'y') {
printf("let's start again); }
else if(letter =='Y'){
printf("alright, let's start again); }
else{
do {
printf("please enter y or n");
scanf("%c"&letter);
} while(letter != 'y' || letter != 'Y')
} while (letter == 'y' || letter == 'Y')
printf("Goodbye");
return 0; }
Sorry if there are any typos or stuff
Sorry it looks ugly too :(
4 notes · View notes
wolfhowls · 7 months ago
Text
Arduino Pro Micro gear shifter (for ETS2/ATS)
Here's the source code of a quick and dirty emulator for 16 gears shifter (originally from MAN trucks) adapted to Logitech G-27 shifter/USB.
/*-------------------------------------------------- Sample code by Matthew Heironimus https://github.com/MHeironimus/ArduinoJoystickLibrary 2016-11-24 Gear shifter for MAN lever and ETS2/ATS mod by Genxha https://wolfhowls.tumblr.com/ Wiring: Lever wire > Pro Micro Pin Upper (round) button (Emulated X button index 3 joy 4) Blue > GND Yellow > 5 Side selector (Emulated B button Index 2 joy 3) Violet > 4 Green > GND Lower selector (Emulated A button - both positions index 0, 1 joy 1, 2) White > GND Red > 3 Blue* > 2 <---- Note: solder a spare wire between center position of lower selector to pin 2 -----------------------------------------------*/ #include Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_GAMEPAD, 4, 0, // Button Count, Hat Switch Count false, false, false, // X and Y, but no Z Axis false, false, false, // No Rx, Ry, or Rz false, false, // No rudder or throttle false, false, false); // No accelerator, brake, or steering void setup() { // Initialize Button Pins for (int index = 0; index < 4; index++) { int pin = index + 2; pinMode(pin, INPUT_PULLUP); } Joystick.begin(); // Initialize for (int index = 0; index < 4; index++) { // Reset Joystick.setButton(index, !digitalRead(index + 2)); } } void loop() { int lastButtonState[4]; for (int index = 0; index < 4; index++) { // read and set initial button status lastButtonState[index] = digitalRead(index + 2); } /* Main FOR loop */ for (int index = 0; index < 4; index++) { // read button status and send joystick events int pin = index +2; int currentButtonState = !digitalRead(pin); if (currentButtonState != lastButtonState[index]) { Joystick.setButton(index, currentButtonState); lastButtonState[index] = currentButtonState; } } }
0 notes
absolutcoca · 11 months ago
Text
Tumblr media
very unconventional way to convey your despair, creator of w3school's c language learning page
0 notes
thedbahub · 1 year ago
Text
Connecting SQL Statements to C#: Traceability Techniques for Seamless Integration
In the realm of software development, traceability plays a crucial role in ensuring the integrity and maintainability of your codebase. When it comes to connecting SQL statements to C# code, implementing effective traceability techniques becomes even more essential. In this article, we’ll explore practical T-SQL code examples and applications that demonstrate how to establish a robust connection…
View On WordPress
0 notes
giggibaloggio · 2 years ago
Text
Tumblr media
proud to be learning c++
12K notes · View notes
faebiebot · 2 years ago
Text
Ive successfully made a Brainfuck compiler!
Tumblr media
First I started out getting my program to read from a file
Tumblr media
but once I knew how to write a file it was trivial to convert the Brainfuck code to C code. there's a bit of file path hard coding i'm not exactly happy with but i'm probably the only person that's gonna use this compiler.
Of course initial drafts of the compiler wrote some uncompilable code but once I got rid of the typos Its a fully functional.
I think...
0 notes
forsapphics · 2 months ago
Text
Tumblr media
1K notes · View notes
engravedlives · 1 year ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
misc coding stamps graphics
4K notes · View notes
girlworshippr · 4 days ago
Text
mom having another girl to give her older daughter "someone to play with" and big sister really taking that to heart <33 turning her little sis into the perfect toy for her, teaching her how to take big sis's cock without waking up mom, how to keep her happy so her big sister is never bored again <333
585 notes · View notes
onewedata · 11 months ago
Photo
Tumblr media
© С-соᴅе ♡ do not edit or crop logo.
4 notes · View notes
mordenandmerry · 6 months ago
Text
I distinctly remember ranting on tumblr about a problem in my code like half a year ago and I was frustrated with arrays of strings in c++ and I REMEMBER a furry adding a comment that just said “you could try parsing the string uwu” and I did it and it WORKED and I was so relieved because I had been fighting with it for like a week.
The only problem is I can’t find that post and I think I dreamt it up. I think God came to me in a dream as a furry responding to my tumblr post to help me fix my code. I am going insane why did my brain do this.
800 notes · View notes
clingyduoapologist · 2 years ago
Text
Honestly bro we don’t talk about how Wilbur thought doomsday was his explosion enough… like bro came back like “damn I really did a number on this place huh 😎” and then no one corrected him because like what would you say in that situation? “Oh hey sorry bro no ur massively important suicide bombing that you’ve defined your entire sense of self around was like fixed on a week. That hole was some other bitches sorry” literally c!tubbo deserves an award for not pushing him into the hole
5K notes · View notes
teenageclown · 8 months ago
Text
Tumblr media
A part of me will always love you
A part of me will always look for you
A part of me will always ponder into old memories
A part of me will always regret losing you
A part of me will always remember you
A part of me will never forget you
A part of me will never let you die
A part of me always dies remembering you
A part that you took while you left
A part I could never get back
A part that is a sweet torture
A part I lost while loving you.
Tshering Chekii
849 notes · View notes
justicefortulsa · 10 months ago
Text
Tumblr media
not a lot☹️ just forever😖 intertwined😢sewn together 😭😭
darry soda and pony u guys deserve the world and everything in it i luv you………,,,..,,
————
i finally finished this nd i think i’m pretty proud of it yippee and i lowkey mixed the musical and movie descriptions of them so ignore that i wanted too
i also have like 3 different versions of this so idk which i like most raaah
1K notes · View notes
fishduhh · 12 days ago
Text
Tumblr media
saw a reference where jacob is kinda delusional he would call m/c his spouse
(midterms is over RAHHHHH)
191 notes · View notes