Share
Explore BrainMass

Outputed Characters in C

***This is in C***

Given abcdefghi as input

char Ch='/';
while (Ch !='d')
{
putchar (Ch);
Ch = getchar();
}

What characters are outputed?

abc, d, /abc, or /efghi

Totally lost with this one (/efghi perhaps)

Solution Preview

Welcome!

Here is the code I ran:

#include <stdio.h>

int main() {
char Ch='/';
while (Ch !='d')
{
putchar ...

Solution Summary

This solution explains the significance of outputed characters in C.

$2.19