#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
What are the modifiers available in c programming language?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
When can you use a pointer with a function?
What is the code in while loop that returns the output of given code?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
What is the use of typedef in c?
What is preprocessor with example?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Explain how do you print an address?
How many levels of indirection in pointers can you have in a single declaration?
Why do we use c for the speed of light?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
Define Array of pointers.