Computer Science, asked by rr932223, 6 months ago

What will be the output of following code?
//Assume necessary header files are present
#include<stdio.h>
int main()
{ {
int a=19;
if(a=20)
printf("Hi");
else
printf("Hello");
return 0;
}​

Answers

Answered by rajsrestha5
0

Answer:

Give the output of the following program ( Assuming that all required header files are included in the program )

Give the output of the following program ( Assuming that all required header files are  included in the program )  

#include<iostream.h>

#include<stdio.h>

#include<conio.h>

void TRANSFER(char *s1,char *s2)

{ int n,j=0;

for(int i=0;*(s1+i)!='\0';i++)

{  

n=*(s1+i);

if(n%2==0)

*(s2+j++)=*(s1+i);

} }

void main()

{ char *p="ChaRlesBabBaGe",q[80];

TRANSFER(p,q);

cout<<q<<endl;}

Explanation:

Answered by happye779
0

Answer:

the output is Hi

because if 19=20

= means assignment operator

so the output is Hi

if a==20

then output will be hello

therefore the answer is Hi

Similar questions