This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newcommand{\lneg}[1]{\ensuremath{#1^{\bot}}} | |
\newcommand{\dlneg}[1]{\ensuremath{#1^{\bot\bot}}} | |
\newcommand{\parr}{\mathbin{⅋}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef char* String; //From now on whenever the compiler sees "String" it knows it refers to a "char*" | |
int main(int argc, char* argv[]) { | |
String str1 = "Hello World!"; //Normal string syntax still works | |
String str2 = (String)malloc(50 * sizeof(char)); //Allocate 50 character's worth of bytes on the heap | |
//You ought to check the return vlaue for malloc() |