Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- FILE* fptr;
- char filename[50];
- printf("Enter the file name: ");
- scanf("%s", &filename);
- fptr = fopen(filename, "r");
- char line[200];
- while (fgets(line, sizeof(line), fptr)) {
- if (!(line[0] == '/' && line[1] == '/')) {
- printf("%s", line);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement