in malloc and calloc which one is fast and why?
Answer / bobby sigh
malloc is more faster than calloc because malloc required
only const sign integer or datatype
while calloc required type,block
so malloc is more faster than calloc
| Is This Answer Correct ? | 13 Yes | 1 No |
#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?
What is the purpose of the preprocessor directive error?
/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }
Why is c called c?
logic for generating all the combinations of the any number of given letters. ex::::::::: if a,b,c,d are given the o/p should be abcd,dcba,dbac,bcad,................ 4*3*2*1 combinations............
main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }
1 Answers Vector, Vector India,
Write a program which returns the first non repetitive character in the string?
What is difference between structure and union with example?
void main() { int a=1; while(a++<=1) while(a++<=2); }
How can I implement sets or arrays of bits?
What are the __date__ and __time__ preprocessor commands?