Answer:
Following is the program in C language :
#include <stdio.h> // header file
#define n 5 // macro
int main() main function
{
int a[n],k1; // variable and array declaration
printf("Enter the element:\n");
for(k1=0;k1<n;++k1) //iterating the loop
{
scanf("%d",&a[k1]);//Read the values by user
}
printf("Output in Reverse Order:\n");
for(k1=n-1;k1>=0;--k1)//iterating the loop
{
printf(" %d ",a[k1]); //Display the values
}
return 0;
}
Output:
Enter the element:
4
3
45
67
89
Output in Reverse Order: 89 67 45 3 4
Explanation:
Following is the description of the program
- Define a macro "n" with value 5 after the header file.
- Declared an array "a" and defined the size of that array by macro i.e "n".
- Read the value by the user by using scanf statement in the array "a"
- Finally In the last for loop display the values of array "a" by space.
Answer:
def print_num_pattern(num1,num2):
if (num1 <= 0):
print(num1, end = ' ')
return
print(num1, end = ' ')
print_num_pattern(num1 - num2, num2)
print(num1, end = ' ')
print_num_pattern(12,3)
Explanation:
I believe the answer to this question is XML
Answer:
Encapsulation
Explanation:
There are seven layers in the OSI network model. These layers are, application, presentation, session, transport, network, data-link and physical layer.
Each layer of the OSI model has a PDU or protocol data unit. These PDUs are form by encapsulation.
The application, presentation and session data. When it moves to the transport layer, it is encapsulated within the transport header. This new pdu is called segment.
This process continues in network and data-link to give packet and frame PDUs respectively.