#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?
Answer Posted / 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 |
Post New Answer View All Answers
Explain what is the difference between null and nul?
What is return type in c?
Write a program to print factorial of given number without using recursion?
How are strings stored in c?
What are runtime error?
How do I get an accurate error status return from system on ms-dos?
What are the application of void data type in c?
What is volatile, register definition in C
How would you use the functions fseek(), freed(), fwrite() and ftell()?
How do you determine a file’s attributes?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What does c mean in basketball?
Explain what is the difference between the expression '++a' and 'a++'?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
When can you use a pointer with a function?