aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming (C/C++)
  • char* myFunc (char *ptr) { ptr += 3; return (ptr); } int ...
Multiple choice

char* myFunc (char *ptr) { ptr += 3; return (ptr); } int main() { char *x, *y; x = HELLO; y = myFunc (x); printf (y = %s n, y); return 0;
} What will be the output when the sample code given above is executed?

  1. y = HELLO

  2. y = ELLO

  3. y = LLO

  4. y = LO

  5. y = O

Reveal answer Fill a bubble to check yourself
D Correct answer

Keep practicing — related questions

  • char* riteshFunc (char *ptr) { ptr += 3; return (ptr); } int main() { char *x, *y; x = "HELLO"; y = riteshF...
  • What would be the output of the following? char *fun(char *ptr) { ptr+=3; return(ptr); } void main() { char...
  • void myFunc (int x) { if (x > 0) myFunc(--x); printf(%d, , x); } int main() { myFunc(5); return 0; } What w...
  • What will be the output of the following: void main() { char const *ptr="abc"; ptr="xyz"; printf("%s",ptr); }
  • What will be the output of the following program? void main() { int val=1234; int* ptr=&val; printf("%d %d"...
  • What will be the output of the following: void main() { char * const ptr="abc"; ptr="xyz"; printf("%s",ptr); }
  • What will be the output of the code snippet? int funct(a,b) int a,b; { return a*b; } void main() { int i=13...
  • char *buffer = 0123456789; char *ptr = buffer; ptr += 5; printf( %s, ptr ); printf( %s, buffer ); What will...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy