Yes, include files can be nested in C and C++. In fact, most library implementations do just that.
Include files are also known as header files.
s.
// HI THIS IS MAYANK PATEL /*C Program to find Maximum of 3 nos. using Nested if*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c; // clrscr(); printf("Enter three number\n\n"); scanf("d%d",&a,&b,&c); if(a>b) { if(a>c) { printf("\n a is maximum"); } else { printf("\n c is maximum"); } } else { if(b>c) { printf("\n b is maximum"); } else { printf("\n c is maximum"); } } getch(); }
The nested loop.
Nesting can be a very handy tool in C++, but should be avoided if possible.C++ gives us If statements, For loops and many other things. These can be nested. For example:A nested If statement://outer if statementIf( this is true ){//nested if statementif( this is also true ){//do something}else{//do something else}}
Yes.
Include files are also known as header files.
It isn't necessary to include header files in C. However, without the functionality provided by some header files, your program wouldn't be able to do very much that is useful.
to include the header files.
Directories, like /usr/include or C:\MYCOMPILER\INCLUDE
# include <stdio.h> # include <conio.h> # include <stdlib.h> # include <string.h>
s.
The C header files are in the same place as other Unix and Unix-like systems: /usr/include if you installed the compiler.
#include "insertthefilenamehere"Its depend on your editor which editor you follow, If you are executing your program in Borland C\C++ then u can declare like this also#include#includeRegards...Mack Dsoza
Just go to your compiler's include directory, and count the files, there can be dozens of them (Or hundreds. Or more.)
// HI THIS IS MAYANK PATEL /*C Program to find Maximum of 3 nos. using Nested if*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c; // clrscr(); printf("Enter three number\n\n"); scanf("d%d",&a,&b,&c); if(a>b) { if(a>c) { printf("\n a is maximum"); } else { printf("\n c is maximum"); } } else { if(b>c) { printf("\n b is maximum"); } else { printf("\n c is maximum"); } } getch(); }
In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.