void ( * abc( int, void ( *def) () ) ) ();
Answer / susie
Answer : :
abc is a ptr to a function which takes 2 parameters .(a).
an integer variable.(b). a ptrto a funtion which
returns void. the return type of the function is void.
Explanation:
Apply the clock-wise rule to find the result.
| Is This Answer Correct ? | 5 Yes | 1 No |
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
What is data _null_? ,Explain with code when u need to use it in data step programming ?
Finding a number which was log of base 2
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }