C Programming Questions & Answers: part4



Software Programming : C Programming QUESTIONS AND ANSWERS :: part4 : 6 to 10

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

6.malloc( ) function returns pointer to

integer
void
character
structure
stack memory.

7.String concatenation means

Combining two strings
Extracting a substring out of a string
Partitioning the string into two strings
Merging two strings
Comparing the two strings to define the larger one.

8.Consider the following declerations union id { char color; int size; }; struct { char country; int date; union id; }flag; To assign a color to a flag, the correct statement would be

flag.color = �W�;
flag.id.color = �W�;
flag.color = �WHITE�;
flag.id.color = �WHITE�;
color.flag = �W�;

9.Consider the following program fragment for( c = 1, sum=0; c <= 10; c++ ) { scanf(�%d�, &x ); if( x < 0 ) continue; sum += x; } What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5

0
30
10
1
15.

10.Elements of the array are accessed by

Index
Mathematical function
Accessing the function in built-in data structure
int I;
a[0].

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
The only place where success comes before work is in the dictionary.- Vidal Sassoon