Category: A ll Codes
#include<stdio.h> int main(){ int a=100,b=-70,i; i=!(a>b);// when we use !a it is zero as any non zero…
code: #include<stdio.h> int main() { int a=5,b=2; float r; char ch=5; r=(float)a/b; printf(“%f”,r); return 0; } Typecasting…
code: #include<stdio.h> #include<math.h> int main() { int n,A[100005],i; long long int answer=1; //it should not be int…
code: /* Count Frequency in an Array(Optimized Version) Syed Ahmed Zaki — 2017 */ #include<stdio.h> int linear_search(int…
Some theory: code: /* Count Frequency in an Array Syed Ahmed Zaki — 2017 */ #include<stdio.h> int…
iterative code: #include<stdio.h> int binarysearch(int A[],int n,int x) { int low=0, high=n-1; while(low<=high) { int mid=(low+high)/2; //eta…
Recent Comments