#include<std.h>
int main()
{
char *str[]={"Frogs","Do","Not","Die","They","Croak!"};
printf("%d %d\n",sizeof(str),strlen(str));
...return 0;
}
what will the output of the above program?

Answers were Sorted based on User's Feedback



#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / sr. amit tyagi

hi dear my name is Amit.
firtly i want to ask that you have used std.h. header
file.can u tell me about this one becuouse i am using
stdio.h header file instead of it.it can make an error if
it is not header file.second thing is that you have used
function strln() which is the function of string.h. to use
this function we have to this header file.it will produced
error with out this header file.
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char *str[]={"Frogs","Do","Not","Die","They","Croak!"};
printf("%d %d\n",sizeof(str),strlen(str));
getch();
}
the out put will be 12 and 1....

Is This Answer Correct ?    3 Yes 1 No

#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / janava

In this it generate an error because declaration the array
as char but read the variable as integer.

Is This Answer Correct ?    7 Yes 6 No

#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / s.ramakrishna

thw output becomes 6 6
why because the character pointer stores their values and
that will be printed

Is This Answer Correct ?    4 Yes 3 No

#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / naresh lingampally

will be a error since ..

syn: *x will be a pointer and it would always be a digit .
so no variable address can be a character ...

MAKES SENSE ?

Is This Answer Correct ?    0 Yes 1 No

#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / guest

6


Is This Answer Correct ?    0 Yes 2 No

#include<std.h> int main() { char *str[]={"Frogs","Do","Not",..

Answer / kelly baby

Hello dear new friend,
my name is Kelly i read your profile and i decided to
contact you hopping that you will accept me as your friend,
please if you accept my request reply my true my email
address (kellybaby004@yahoo.in) so that i will send you my
picture and tell you more about me, do not late far
decadence be a barrier let love cornet because love is
abridge cornet far decadence to be lose.
yours kelly

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

What is integer constants?

0 Answers  


what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....

1 Answers   TCS,


write a C and C++ programme to implement the A,bubble sort B,quick sort C,insertion sort D,sequential search E,binary search

1 Answers   ADP, TCS,


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

15 Answers   Mascot,






Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4

2 Answers   Mascot,


totally how much header files r in c language

8 Answers   TCS,


What is the difference between formatted&unformatted i/o functions?

0 Answers  


Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

4 Answers   Accenture,


write a program to convert a expression in polish notation (postfix) to inline (normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix

0 Answers  


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

0 Answers  


Where can I get an ansi-compatible lint?

0 Answers  


Categories