#include <stdio.h>
main()
{
char * str = "hello";
char * ptr = str;
char least = 127;
while (*ptr++)
least = (*ptr<least ) ?*ptr :least;
printf("%d",least);
}
Answer / susie
Answer :
0
Explanation:
After ‘ptr’ reaches the end of the string the value pointed
by ‘str’ is ‘\0’. So the value of ‘str’ is less than that of
‘least’. So the value of ‘least’ finally is 0.
Is This Answer Correct ? | 2 Yes | 0 No |
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
Give a one-line C expression to test whether a number is a power of 2.
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
How we print the table of 3 using for loop in c programing?
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }