edited by
351 views
0 votes
0 votes

Find out the output of the given program?

include<stdio.h>
int main()
{
    char s[] = "Hello";
    char *ptr = s ;
    *ptr++; // please explain this line
     ptr++;
    printf("%s",ptr);
    return 0;
}

 

edited by

Please log in or register to answer this question.

Related questions

133
views
2 answers
1 votes
kirmada asked Jun 20
133 views
#include <stdio.h> int main() { // Write C code here int i=10,*p,**q,***r; p=&i; *p=15; q=&p; **q=20; r=&q; ***r=*p+1; printf("%d",i); return 0; }answer the output as integer _________
91
views
0 answers
1 votes
shivamSK asked Jun 19
91 views
#include <stdio.h> void f(int (*x)(int)); int mysh(int); int (*sh)() = mysh; int main() { f(sh); sh++; for(int x=sh;x>=0;x--){ if(x){ printf ... A:10C:10 i will go thereB:10 i will go there number of timesD:10 i will go here number of times
117
views
1 answers
1 votes
shivamSK asked Jun 9
117 views
#include <stdio.h> double pom(double x,int n){ if(n==1) return x; else return x*pom(x,n-1); --n; } int main() { int a=pom(2,5); printf("%d",a); return 0; }what is the output of following c codeA:2B:32C:16D:NONE
100
views
1 answers
1 votes
shivamSK asked Jun 9
100 views
what is output of this c codeA: 321B: 123C: error(infinite/segmentation)D:333