Skip to content
TeeKaa OpSec AB Blog

TeeKaa OpSec AB Blog

Side Projects, tutorials, howtos and notes

  • Blog Home
  • Privacy Policy
  • About this blog
  • Back to Main Site
  • Toggle search form

Hello world!

Posted on 2022-11-262023-02-02 By Teekåå
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
 
int main(void)
{
  const char* s = "Hello World";
  printf(" padding:\n");
  printf("\t[%10s]\n", s);
  printf("\t[%-10s]\n", s);
  printf("\t[%*s]\n", 10, s);

  printf("Fixed-width types:\n");
  printf("\tLargest 32-bit value is %" PRIu32 " or %#" PRIx32 "\n",
                                     UINT32_MAX,     UINT32_MAX );
}

C99 GCC 12.1

> gcc hlwld.c -o helloword
> ./helloworld

padding:
[ Hello World]
[Hello World ]
[ Hello World]
Fixed-width types:
Largest 32-bit value is 4294967295 or 0xffffffff

Related

Offtopic or noncategorizable

Post navigation

Next Post: Blink

Related Posts

Blink Offtopic or noncategorizable

Archives

  • February 2023
  • January 2023
  • December 2022
  • November 2022

Categories

  • Educational content
  • Hardware hacking 101
  • Informative Rants
  • Offtopic or noncategorizable
  • Warnings and newsflash

Recent Posts

  • Secure C programming practices (or HowToMake C Memory Safe(r))
  • Breaking news! Update every device you own, Qualcomm TrustZone TrustEnvironment is pwned
  • Addition to FISA702 rant about who has access to your living room
  • The Right to Privacy, Data Protection and American legislative FISA702
  • Something to practice on (series): Asus router

Recent Comments

No comments to show.

Copyright © 2023 TeeKaa OpSec AB Blog.

Powered by PressBook Masonry Dark