main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
}
Answer / susie
Answer :
0 0 1 3 1
Explanation :
Logical operations always give a result of 1 or
0 . And also the logical AND (&&) operator has higher
priority over the logical OR (||) operator. So the
expression ‘i++ && j++ && k++’ is executed first. The
result of this expression is 0 (-1 && -1 && 0 = 0). Now
the expression is 0 || 2 which evaluates to 1 (because OR
operator always gives 1 except for ‘0 || 0’ combination- for
which it gives 0). So the value of m is 1. The values of
other variables are also incremented by 1.
| Is This Answer Correct ? | 39 Yes | 11 No |
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
writte a c-programm to display smill paces
main() { int i=5,j=6,z; printf("%d",i+++j); }
main() { clrscr(); } clrscr();
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
how to return a multiple value from a function?
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
How will u find whether a linked list has a loop or not?
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.