Problems On Decision Control Loop !!
1.
#include <stdio.h>
int main(void) {
int j=4,k;
k=!5&&j;
printf ("k=%d \n" , k);
 return 0;
}
Output;- K=0
--------------------------------------------------------------------------------------------------------------------------
2.
#include <stdio.h>
int main(void) {
int i=10,j=10;
if(i && j ==10 )
printf ("Have a nice day \n ");
 return 0;
}
Output :- Have a nice day 
--------------------------------------------------------------------------------------------------------------------------
3.
#include <stdio.h>
int main(void) {
int j=4;
(!j!=1?printf("Welcome \n"): printf("Good bye \n"));
 return 0;
}
Output:- Welcome 
--------------------------------------------------------------------------------------------------------------------------
 
No comments:
Post a Comment