You are not logged in.

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

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
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


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-16 05:21:33

Advertisement
Ads By Google

Re: C Language Arrays And Strings Program Output:



Board footer