C Programming :: Pointers - Discussion
Home > C Programming > Pointers > MCQs Questions Discussion
43 / 60
Find the output for the following C program?
#include <stdio.h>
void print(char *p);
int main()
{
char s[] = "T.C.S", *A;
print(s);
return 0;
}
void print(char *p)
{
while (*p != '\0')
{
if (*p != ".")
printf ("%c", *p);
p++;
}
}
#include <stdio.h>
void print(char *p);
int main()
{
char s[] = "T.C.S", *A;
print(s);
return 0;
}
void print(char *p)
{
while (*p != '\0')
{
if (*p != ".")
printf ("%c", *p);
p++;
}
}
ATCS
BT.C.S
CSegmentation fault
DNone of the above
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!