<<= Back Next =>>
You Are On Multi Choice Question Bank SET 188

9401. Will the program compile successfully? #include<stdio.h> int main() { char a[] = "India"; char p = "BIX"; a = "BIX"; p = "India"; printf("%s %s\n", a, p); return 0; }



9402. For the following statements will arr[3] and ptr[3] fetch the same character? char arr[] = "IndiaBIX"; char ptr = "IndiaBIX";



9403. Is there any difference between the two statements? char ch = "IndiaBIX"; char ch[] = "IndiaBIX";



9404. Which of the following function sets first n characters of a string to a given character?





9405. If the two strings are identical, then strcmp() function returns





9406. How will you print \n on the screen?




9407. The library function used to find the last occurrence of a character in a string is





9408. Which of the following function is used to find the first occurrence of a given string in another string?





9409. Many times we see in newspapers that some projects are launched by the Govt. Authorities on ‘PPP’ basis. What is the full form of ‘PPP’ ?





9410. Which of the following countries is not the member of Asia Pacific Economic Cooperation (APEC) which was in news recently ?





9411. The opposite of ‘‘implicit’’ is:





9412. ‘Gas’ is to ‘gaseous’ as ‘water’ is to:





9413. The meaning of ‘Prodigal’ is





9414. What will be the output of the program ? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0]=3; u.ch[1]=2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; }





9415. What will be the output of the program ? #include<stdio.h> int main() { union var { int a, b; }; union var v; v.a=10; v.b=20; printf("%d\n", v.a); return 0; }





9416. What will be the output of the program ? #include<stdio.h> int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1, 2, 13}; printf("%d, %d, %d\n", bit.bit1, bit.bit3, bit.bit4); return 0; }





9417. What will be the output of the program in 16 bit platform (Turbo C under DOS) ? #include<stdio.h> int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit; printf("%d\n", sizeof(bit)); return 0; }





9418. What will be the output of the program ? #include<stdio.h> int main() { enum days {MON=-1, TUE, WED=6, THU, FRI, SAT}; printf("%d, %d, %d, %d, %d, %d\n", MON, TUE, WED, THU, FRI, SAT); return 0; }





9419. What will be the output of the program ? #include<stdio.h> int main() { enum status {pass, fail, absent}; enum status stud1, stud2, stud3; stud1 = pass; stud2 = absent; stud3 = fail; printf("%d %d %d\n", stud1, stud2, stud3); return 0; }





9420. What will be the output of the program ? #include<stdio.h> int main() { int i=4, j=8; printf("%d, %d, %d\n", i|j&j|i, i|j&j|i, i^j); return 0; }





9421. What will be the output of the program in Turbo C (under DOS)? #include<stdio.h> int main() { struct emp { char n; int age; }; struct emp e1 = {"Dravid", 23}; struct emp e2 = e1; strupr(e2.n); printf("%s\n", e1.n); return 0; }




9422. What will be the output of the program in 16-bit platform (under DOS)? #include<stdio.h> int main() { struct node { int data; struct node link; }; struct node p, q; p = (struct node ) malloc(sizeof(struct node)); q = (struct node ) malloc(sizeof(struct node)); printf("%d, %d\n", sizeof(p), sizeof(q)); return 0; }





9423. What will be the output of the program ? #include<stdio.h> int main() { struct byte { int one:1; }; struct byte var = {1}; printf("%d\n", var.one); return 0; }





9424. What will be the output of the program ? #include<stdio.h> int main() { enum days {MON=-1, TUE, WED=6, THU, FRI, SAT}; printf("%d, %d, %d, %d, %d, %d\n", ++MON, TUE, WED, THU, FRI, SAT); return 0; }





9425. What will be the output of the program ? #include<stdio.h> struct course { int courseno; char coursename[25]; }; int main() { struct course c[] = { {102, "Java"}, {103, "PHP"}, {104, "DotNet"} }; printf("%d ", c[1].courseno); printf("%s\n", ((c+2)).coursename); return 0; }





9426. What will be the output of the program given below in 16-bit platform ? #include<stdio.h> int main() { enum value{VAL1=0, VAL2, VAL3, VAL4, VAL5} var; printf("%d\n", sizeof(var)); return 0; }





9427. Point out the error in the program? struct emp { int ecode; struct emp e; };





9428. Point out the error in the program? typedef struct data mystruct; struct data { int x; mystruct b; };





9429. Point out the error in the program? #include<stdio.h> int main() { struct a { float category:5; char scheme:4; }; printf("size=%d", sizeof(struct a)); return 0; }





9430. The headquarters of Kerala Grameen Bank?





9431. Point out the error in the program? #include<stdio.h> int main() { struct emp { char name[20]; float sal; }; struct emp e[10]; int i; for(i=0; i<=9; i++) scanf("%s %f", e[i].name, &e[i].sal); return 0; }





9432. Point out the error in the program? #include<stdio.h> #include<string.h> void modify(struct emp); struct emp { char name[20]; int age; }; int main() { struct emp e = {"Sanjay", 35}; modify(&e); printf("%s %d", e.name, e.age); return 0; } void modify(struct emp p) { p ->age=p->age+2; }





9433. Point out the error in the program in 16-bit platform? #include<stdio.h> int main() { struct bits { int i:40; }bit; printf("%d\n", sizeof(bit)); return 0; }





9434. Point out the error in the program? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a z1 = {512}; union a z2 = {0, 2}; return 0; }





9435. Point out the error in the program? #include int main() { struct emp { char n[20]; int age; }; struct emp e1 = {"Dravid", 23}; struct emp e2 = e1; if(e1 == e2) printf("The structure are equal"); return 0; }





9436. Point out the error in the program? #include<stdio.h> int main() { struct bits { float f:2; }bit; printf("%d\n", sizeof(bit)); return 0; }





9437. Point out the error in the program? #include<stdio.h> int main() { struct emp { char name[25]; int age; float bs; }; struct emp e; e.name = "Suresh"; e.age = 25; printf("%s %d\n", e.name, e.age); return 0; }





9438. Which of the following statements correct about the below program? #include<stdio.h> int main() { struct emp { char name[25]; int age; float sal; }; struct emp e[2]; int i=0; for(i=0; i<2; i++) scanf("%s %d %f", e[i].name, &e[i].age, &e[i].sal); for(i=0; i<2; i++) scanf("%s %d %f", e[i].name, e[i].age, e[i].sal); return 0; }





9439. Which of the following statements correct about the below program? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u1 = {512}; union a u2 = {0, 2}; return 0; } 1: u2 CANNOT be initialized as shown. 2: u1 can be initialized as shown. 3: To initialize char ch[] of u2 '.' operator should be used. 4: The code causes an error 'Declaration syntax error'





9440. Which of the following statements correctly assigns 12 to month using pointer variable pdt? #include<stdio.h> struct date { int day; int month; int year; }; int main() { struct date d; struct date pdt; pdt = &d; return 0; }





9441. Which of the following statements correct about the below code? maruti.engine.bolts=25;





9442. A union cannot be nested in a structure



9443. Nested unions are allowed



9444. Bit fields CANNOT be used in union.



9445. one of elements of a structure can be a pointer to the same structure.



9446. A structure can be nested inside another structure.



9447. Which of the following statement is True?





9448. The '.' operator can be used access structure elements using a structure variable.



9449. Union elements can be of different sizes.



9450. A structure can contain similar or dissimilar elements



<<= Back Next =>>
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution