Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
subroutine_direct.c and subroutine_indirect.c
Created
7 years ago
Diff never expires
Clear
Export
Share
Explain
2 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
23 lines
Copy
1 addition
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
23 lines
Copy
#include <stdio.h>
#include <stdio.h>
typedef int (*func_t)(void);
typedef int (*func_t)(void);
int subroutine(){
int subroutine(){
printf(" I am the subroutine\n");
printf(" I am the subroutine\n");
return 0;
return 0;
}
}
int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
{
printf("--> Start %s\n", argv[0]);
printf("--> Start %s\n", argv[0]);
// Direct call
// Direct call
Copy
Copied
Copy
Copied
subroutine();
//
subroutine();
// Indirect call
// Indirect call
Copy
Copied
Copy
Copied
//
func_t f_sub = &subroutine;
func_t f_sub = &subroutine;
//
f_sub();
f_sub();
return 0;
return 0;
}
}
Saved diffs
Original text
Open file
#include <stdio.h> typedef int (*func_t)(void); int subroutine(){ printf(" I am the subroutine\n"); return 0; } int main(int argc, char *argv[]) { printf("--> Start %s\n", argv[0]); // Direct call subroutine(); // Indirect call //func_t f_sub = &subroutine; //f_sub(); return 0; }
Changed text
Open file
#include <stdio.h> typedef int (*func_t)(void); int subroutine(){ printf(" I am the subroutine\n"); return 0; } int main(int argc, char *argv[]) { printf("--> Start %s\n", argv[0]); // Direct call //subroutine(); // Indirect call func_t f_sub = &subroutine; f_sub(); return 0; }
Find difference