In the following pgm add a stmt in the function fun such
that the address of
'a' gets stored in 'j'.
main(){
int * j;
void fun(int **);
fun(&j);
}
void fun(int **k) {
int a =0;
/* add a stmt here*/
}
Answer / susie
Answer :
*k = &a
Explanation:
The argument of the function is a pointer to a pointer.
| Is This Answer Correct ? | 1 Yes | 0 No |
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }
why array index always strats wuth zero?
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
what is the code of the output of print the 10 fibonacci number series
C statement to copy a string without using loop and library function..
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
What is "far" and "near" pointers in "c"...?