-
Integral data type
which one of the following is not an integral data type 1. Character 2. Boolean 3. Integer 4. Pointer type
-
-
-
-
-
Output of these programs.
c
struct Foo
{
char *pName;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
strcpy(obj->pName,"Your Name");
printf("%s", obj->pName);
}
a. Your Name
b. compile error
c. Name
d. Runtime error
c
struct Foo
{
char *pName;
char *pAddress;
}; -
-
-
-
-
-
-
-
Why should I prototype a function?
A function prototype tells the compiler what kind of arguments a function is looking to receive and what kind of return value a function is going to give back. This approach helps the compiler ensure that calls to a function are made correctly and that no erroneous type conversions are taking place.
-
-
-
-
-
-
C Interview Questions
Ans