char *someFun()
{
char *temp = “string constant";
return temp;
}
int main()
{
puts(someFun());
}
Answer / susie
Answer :
string constant
Explanation:
The program suffers no problem and gives the output
correctly because the character constants are stored in
code/data area and not allocated in stack, so this doesn’t
lead to dangling pointers.
Is This Answer Correct ? | 4 Yes | 0 No |
What is data _null_? ,Explain with code when u need to use it in data step programming ?
Program to find the largest sum of contiguous integers in the array. O(n)
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
Write a routine that prints out a 2-D array in spiral order
write a c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).
0 Answers CDAC, College School Exams Tests,
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
What are the files which are automatically opened when a C file is executed?
How we will connect multiple client ? (without using fork,thread)
abcdedcba abc cba ab ba a a