c record-5) nested function

#include<stdio.h>

#include<conio.h>

function1();

function2();

function3();

function4();

void main()

{

int a=10000;

clrscr();

function4();

printf("%d\n",a);

getch();

}

function1()

{

int a=1;

printf("%d\n",a);

return a;

}

function2()

{

int a=10;

function1();

printf("%d\n",a);

return a;

}

function3()

{

int a=100;

function2();

printf("%d\n",a);

return a;

}

function4()

{

int a=1000;

function3();

printf("%d\n",a);

return a;

}


output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile




Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

DBMS Degree Lab Records

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

6)what are the various service of internet and protocols ICT-unit-1