Skip to content

Commit

Permalink
Create variable.c
Browse files Browse the repository at this point in the history
  • Loading branch information
VihaanAnand authored Jun 16, 2024
1 parent eaae3c6 commit be51de3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions terminal-tutorial/variable.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <stdio.h>
int main() {
char output[1024];
FILE * pipe = popen("pwd", "r");
fgets(output, sizeof(output), pipe);
pclose(pipe);
printf("%s", output);
}

0 comments on commit be51de3

Please sign in to comment.