Write a C program to calculate the following sum:
Sum = 1-x^2/2!+x^4/4!-x^6/6!+x^8/8!-x^10/10!
#include<stdio.h> #include<conio.h> #include<math.h> void main() { int i,n=10,x; long int fact=1; float sum=1; printf(“Enter the x value:”); scanf(“%d”, &x); for(i=1;i<=n;i++) { fact=fact*i; if(i%2==0) { if(i==2||i=10||i==6) sum+= -pow(x,i)/fact; else sum+=pow(x,i)/fact; } } printf(“sum is %f”, sum); }
Find the time complexity of Binary Search Algorithm.
Write short notes on the following :
a) BFS
b) Tail recursion
Write short note on Call setup of GSM network for mobile-to-mobile call.
What are Halstead’s metrics?
Write short notes on: