348 views
1 votes
1 votes
What is difference between declaration and definition ...in c ?

please explain with examples

1 Answer

0 votes
0 votes
#include<stdio.h>
#include<stdlib.h>
//declaration of a function
void show(int);

//definition of a function which implies the actual working of the
//function.
void show(int x){
    printf("The value is %d\n",x);
}
int main(void){
    //call to the function
show(4);
system("pause");
return 0;
}

Related questions

2 votes
2 votes
0 answers
1
adwaitLP asked Oct 10, 2016
1,199 views
Very basic C language doubt regarding \5 #include <stdio.h int main() { printf("\5"); return 0; }why the output of this code is ♣??
0 votes
0 votes
0 answers
2
ranarajesh495 asked Oct 14, 2018
304 views
Can someone explain how %x works below and how we can write an operation in ths statement.
0 votes
0 votes
1 answer
3
ranarajesh495 asked Oct 13, 2018
273 views
what is the difference between printf(“\nI am don”) and printf(“%s”, I am don);
0 votes
0 votes
1 answer
4
Vaishnavi01 asked Sep 3, 2018
543 views