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 |
write a c-program to display the time using FOR loop
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,
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
program to find magic aquare using array
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];