char inputString[100] = {0};
To get string input from the keyboard which one of the
following is better?
1) gets(inputString)
2) fgets(inputString, sizeof(inputString), fp)
Answer / susie
Answer : & Explanation:
The second one is better because gets(inputString) doesn't
know the size of the string passed and so, if a very big
input (here, more than 100 chars) the charactes will be
written past the input string. When fgets is used with stdin
performs the same operation as gets but is safe.
| Is This Answer Correct ? | 2 Yes | 0 No |
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
What is your nationality?
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O
void main() { int i=i++,j=j++,k=k++; printf(ā%d%d%dā,i,j,k); }
Link list in reverse order.
What are the files which are automatically opened when a C file is executed?
what is the code of the output of print the 10 fibonacci number series
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
What is the main difference between STRUCTURE and UNION?
Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0