You are not logged in.

#1 2015-09-16 05:21:40

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

C Language Arrays And Strings Program Output:

C Programming Quizzes C Language Arrays And Strings

Directions:
#include<stdio.h>
#include<string.h>
void main()
{
    char str1[20] = "Hello", str2[20] = " World";
    printf("%sn", strcpy(str2, strcat(str1, str2)));
}

Question:
What will be the output of the program?

Option A):
World
Option B):
WorldHello
Option C):
Hello
Option D):
Hello World

Correct Answer is Option D):
Hello World


Failure is the first step towards seccess.

2015-09-16 05:21:40

Advertisement
Ads By Google

Re: C Language Arrays And Strings Program Output:



Board footer