-
Write your own function stringSize which takes a string s as a parameter and returns its length.
Example:
stringSize(“hello”) returns 5 -
-
-
C code explanation
struct marks
{
int p:3;
int c:3;
int m:2;
};
void main()
{
struct marks s={2,-6,5};
printf("%d%d%d",s.p,s.c,s.m);
} -
Short int and int
What is the difference between short int and int?
-
Write function vowels to count the vowels and letters
Write function vowels to count the vowels and letters in free text given as string. Then print out the number of occurrences of each of the vowels a, e, i, o and u in the string, the total number of letters, and each of the vowels as an integer percentage of the letter total.
Suggested output format is:
Numbers of characters:
a 3 ; e 2 ; i 0 ; o 1 ; u 0 ; rest 17 -
Tiny, large, huge memory models
I need the above said memory types explanation.
Please tell me any one. -
Nested if statement
How many nested if statements are allowed in C?
-
C Pointer Size
If p is declared as char *p then what is size of(*P)?
-
C Program Execution Stages
Briefly explain the stages in execution of C program? How are printf and scanf statements statements being moved into final executable code?
-
Invoke Another Program
How will you invoke another program from within a C program?
-
File Compression
How can we compress any text file using c. can anybody provide me sample code
-
-
Function Call
How will you call a function, given its name as a string?
-
-
Open Files Simultaneously
How will you increase the allowable number of simultaneously open files?
-
-
-
Is it better to use malloc() or calloc()?
Both the malloc() and the calloc() functions are used to allocate dynamic memory. Each operates slightly different from the other. malloc() takes a size and returns a pointer to a chunk of memory at least that big: void *malloc( size_t size ); calloc() takes a number of elements, and the size of each, and returns a pointer to a chunk of memory at least big enough to hold them all: void *calloc(...
-
What is indirection?
If you declare a variable, its name is a direct reference to its value. If you have a pointer to a variable, or any other object in memory, you have an indirect reference to its value.
C Interview Questions
Ans