#include<stdio.h>
int main()
{
char *ptr;
char string[] = "How are you?";
ptr = string;
ptr += 4;
printf("%s",ptr);
return 0;
}

Answers were Sorted based on User's Feedback



#include<stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr =..

Answer / manish tiwari

It will increment the char pointer by 4 bytes and now ptr will point to 'a' inside string so it will print "are you?"

Is This Answer Correct ?    45 Yes 1 No

#include<stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr =..

Answer / satyarani

if int and return 0 is not there, then the output is are you?

Is This Answer Correct ?    12 Yes 1 No

#include<stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr =..

Answer / sakura

it should be "are you?are you?"

Is This Answer Correct ?    7 Yes 3 No

#include<stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr =..

Answer / abarna

The Ans is are You?

Is This Answer Correct ?    2 Yes 2 No

#include<stdio.h> int main() { char *ptr; char string[] = "How are you?"; ptr =..

Answer / subbu

It should be How are you?,

because the pgm didnt mention abt the ptr += 4; statement in the printf("%s",ptr);

if it like ths printf("%s",ptr +);then the ans is are you?

if i am wrong sorry and check ths..thank u..

Is This Answer Correct ?    3 Yes 10 No

Post New Answer

More Engineering AllOther Interview Questions

What is the allowable load carrying capacity of a circular column section of 400 mm diameter reinforced with 6x25 mm diameter bars adequately tied with spirals? Consider concrete of grade M25 and steel of grade Fe 415.

0 Answers  


Is Diesel staorage tank ( 800 litres) cleaning procedure is available with any body

0 Answers  


how to delete four out of five duplicate records in a table using sql

0 Answers  


Please explain why you are suitable for the position that you have applied for?

0 Answers  


The factorial of a nonnegative integer n is written n! (pronounced “n factorial”) and is defined as follows: n! = n · (n - 1) · (n - 2) · … · 1 (for values of n greater than to 1) and n! = 1 (for n = 0 or n = 1). For example, 5! = 5 · 4 · 3 · 2 · 1, which is 120. Use while structures in each of the following: a) Write a program that reads a nonnegative integer and computes and prints its factorial. Use the following function prototype to calculate factorial: int myFactorial(int n); b) Write a program that estimates the value of the mathematical constant e by using the formula: Use the following function prototype to calculate e: double myE( ); Hint: Use an accuracy of 10 terms. c) Write a program that computes the value of ex by using the formula Use the following function prototype to calculate e: double myEx(int x);

2 Answers  






write the output for yhe given program int a=5; void main() { int a=9; printf("%d",a); } printf("%d",&a);

3 Answers   HCL,


i opt cse branch in engineering.which subject i have choose in civil service preliminary examination

0 Answers  


When a new build comes what is the first step taken by a tester in testing

1 Answers   Sonata,


Client server applications

0 Answers   TCS,


pls send me rrb se(s&t)questions

0 Answers   RRB,


WHAT IS THE NAMESPACE FOR CUSTOMCONTROL AND USER CONTROL IN ASP.NET?

0 Answers   Zylog,


Briefly describe your ideal job?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)