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
Answers were Sorted based on User's Feedback
Answer / chandra
Answer is (c)compile error
compiler cannot initialize the string with out "". Hence any
compiler throws an error
If the string is with in "", then answer will be(a) Runtime
error.
since the string strA is used with out being initialized
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / prashant
if quotes are inserted ans will be -->
d) I am O
| Is This Answer Correct ? | 0 Yes | 3 No |
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.
Who could write how to find a prime number in dynamic array?