Awesome q2a theme
0 votes
int fun(char *str1)
    char *str2=str1;
int main()
    char *str="geeksquiz";
        return 0;


this question is from in that the answer is ‘9’ but i compiled in gnu gcc compiler the answer is ‘1’

in Programming by (39 points) | 15 views

1 Answer

0 votes

Here the important line in code is 


If there is no semicolon after while loop then answer is $1$ and if there is a semicolon after while loop answer is $9$.

by (53 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jan 2020
  1. shashin

    1416 Points

  2. Vimal Patel

    377 Points

  3. Deepakk Poonia (Dee)

    350 Points

  4. Debapaul

    276 Points

  5. Satbir

    196 Points

  6. Pratyush Priyam Kuan

    160 Points

  7. tp21

    151 Points

  8. SuvasishDutta

    151 Points

  9. pranay562

    145 Points

  10. DukeThunders

    97 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
3,138 questions
1,550 answers
89,835 users