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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you relate the function with the structure? Explain with an appropriate example.

3126


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

6578


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

2634


why nlogn is the lower limit of any sort algorithm?

2541


Develop a routine to reflect an object about an arbitrarily selected plane

3274






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']

729


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

4047


#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

1295


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

2564


Cluster head selection in Wireless Sensor Network using C programming language.

3377


Sir... please give some important coding questions asked by product companies..

2019


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2351


What is data _null_? ,Explain with code when u need to use it in data step programming ?

3013


Design an implement of the inputs functions for event mode

3164


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3342