Skip to main content

Posts

Coronavirus se safe rhne ke liye kya kre?

Coronavirus se safe rhne ke liye kya kre? Coronavirus esse SARS-COV-2 bhi bolte hai. Jaisa ki aap sabhi jante hai Novel Coronavirus pandemic declare kiya ja chuka hai.ye person to person very fast spread hota hai. Es virus se safe rhne ka rasta:- A.)- 1 st things aap apna immune system strong bnaye rkhe.Agar kisi ko Coronavirus ho gya ho aur unka immune system strong hai to unko keval hlka sa mild symptoms(hlka sa sardi,khasi)aaega aur wo thik ho jaenge.Aapka immune system hi aapke body se aapke virus ko nikalta hai   aur koi nhi.Abhi tak jitne logo ka death huaa hai unme se maximum old age ke the unka immune system weak hota hai. Apne immune system ko strong krne ke liye kya kre? 1:- Apne immune system ko strong krne ke liye Green vegetables khaye aur junk food ko ignore kre. 2:- Citrus Food ex:-lemon,orange etc…..        Grapefruit ye sub jyada matra me khaye. Esse Vitamin and white blood cell cell increase hota hai...

Write a program in foxpro to generate fibonacci series.

                            Ans:- Input"Enter the last term of fibonacci series:-"to num a=0 b=1 i=1 ?a do while(i<=num) c=a+b a=b b=c ?a i=i+1 enddo

Write a data structure program to make an array as stack.

Ans:- #include<stdio.h> #define MAX 10 int st[MAX],top=-1; void push(int st[],int val); int pop(int st[]); void display(int st[]); int main() { int val,option; do { printf("\n *****MAIN MENU*****"); printf("\n 1. PUSH"); printf("\n 2. POP"); printf("\n 3. DISPLAY"); printf("\n 4. EXIT"); printf("\n***************"); printf("\n enter your option:"); scanf("%d",&option); switch(option) { case 1: printf("\n Enter the number to be pushed on the stack:"); scanf("%d",&val); push(st,val); break; case 2: val = pop(st); if(val!=-1) printf("\n The value deleted from the stack is:%d",val); break; case 3: display(st); break;   } } while(option!=5); getch(); return 0; } void push(int st[],int val) { if(top==MAX-1) { printf("\n STACK OVERF...

Write a program to operate on linked list.All possible operation are performed through separate functions.

#include<stdio.h> #include<malloc.h> struct node { int data; struct node *next; }; struct node *start=NULL; struct node *create_11(struct node *); struct node *display(struct node *); struct node *insert_beg(struct node *); struct node *insert_end(struct node *); struct node *insert_before(struct node *); struct node *insert_after(struct node *); struct node *delete_beg(struct node *); struct node *delete_end(struct node *); struct node *delete_node(struct node *); struct node *delete_after(struct node *); struct node *delete_list(struct node *); struct node *sort_list(struct node *); int main() { int option; do { printf("\n\n *****MAIN MENU*****"); printf("\n1:Create a list"); printf("\n2:Display the list"); printf("\n3:Add a node at the beginning"); printf("\n4:Add a node at the end"); printf("\n5:Add a before a given node"); printf("\n6:Add a node after a g...

4.) With argument and With return

In this type of function arguments and parameters must be passed to any function and function return a single value.The type of function depends up on the return value. syntax:- datatype of function name(datatype arg 1,datatype arg2) { statement; ........... ........... return(exp); }                   ex:-main() { int fact(int); printf("\n factorial =%d",fact(5)); getch(); } int fact(int n) { int f=1; while(n>1) { f=f*n; n--; } return(f); }

3.) No argument and with return

In this type of function,parameter and argument are not passed to any f\unction and function must return a value.So the datatype of function depends up on the datatype of return value of the function. syntax:- datatype function name() { statement; .......... ................ return(exp); }               * Ex:- void main() { int x; int sum(); x=sum(); printf("\n sum=%d",x); getch(); } int sum() { int a,b,c; printf("\n enter two number"); scanf("%d%d",&a,&b); c=a+b; return(c); }