Write a C Program That Uses Functions To Delete N – Charactres From A Given Position In A Given String.
#include <stdio.h> #include <conio.h> void del_str(char [],int, int); main() { int n,p; char str[30]; clrscr(); printf("\n Enter the String::"); gets(str); fflush(stdin); printf("\n Enter the position from where the characters are to be deleted:"); scanf("%d",&p); printf("\n Enter Number of characters to be deleted:"); scanf("%d",&n); del_str(str,p,n); printf("::End of the Main program::"); getch(); } void del_str(char str[],int p, int n) { int i,j; for(i=0,j=0;str[i]!='\0';i++,j++) { if(i==(p-1)) { i=i+n; } str[j]=str[i]; } str[j]='\0'; puts(" The string after deletion of characters::"); puts(str); }
Write short notes on the following :
a) BFS
b) Tail recursion
Briefly differentiate between CDMA and GSM technologies.
Write short notes on the following:
Write a C program to find factorial(using recursion) of any no.
Write a C program to find the roots of a quadratic equation.