Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
88 views
19 pages
Grapecity Paper
Uploaded by
arpandixit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download
Save
Save Grapecity Paper For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
88 views
19 pages
Grapecity Paper
Uploaded by
arpandixit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Grapecity Paper For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Grapecity Paper For Later
You are on page 1
/ 19
Search
Fullscreen
GrapeCity C/C++ Interview Questions c/Cr shouts o& PO wtye 1. when shud apointer p be a reference parameter? a-when fn. Changes p, & u want the change to affect actual pointer argument b. when fn. Changes p, & u do not want the change to affect actual pointer argument c. when fn. Changes “p, & u want the change to affect actual pointer argument d. when fn. Changes “p, & u do not want the change to affect actual pointer argument ©, when pointer points to large object 2, output??? int y=45 Int k=2; Int "pi; Int "p2; & “fk; pi=p2; *p1=3 "p2 printf¢ yet b.2 c.3 a4 rameter 3.when shud u use a const reference eames a. whenever the data type might be many bytes \b/ whenever the data type might be many bytes, the fn. Changes the papramter within its body, & u do not want these changes to alter the actual argument c. whenever the data type might be many bytes, the fn. Changes theQe sete papramter within its body, & u DO want these changes to alter the actual argument d. whenevr the data type might be many bytes , & the function does not change the parameter within it body 4.6 Aisa class & B is a new class derived fromA = * Aa; if Bb; Bot; Bb2; { 4, what c++ syntax is used to declare that a class B is derived from Class A” a. class A derives B 1 Ub. class B: public A {... 5. using the variable , which is tegae? d. both a & b are legal but not c; e. both a & c are legal but not b; f. both b & c are legal , but not a; 6. suppose there ar e 2 fns. F has an argument of type A and g has an argument of type B. Which is correct? a. both f(a) & g(a) are legal fn. Calls Ae f(a) is legal , but g(a) is not legal c. f(a) is not legal , g(a) is legal d. neither f(a) nor g(a) is legal fn call 7. template void foo(item x); which is right way to call with integer argument I? ® fooli); - b. foo (i); c. foo(i);d. foo i); @. foot i); 8. 9. void quiz(int w) [ if(we1) { quiz (w/2); quiz(w/2); } printf("*"); } how many asterisks are printed by the function call quiz(5)? a.3 an oN & 10. void test_a (int n) t printf("%d",n); if(n>0) test_a(n-2)5 e} test_a(4)? a.024 c.02 d.24 e.42 vi 420 11. char string[8]="abcdefg"; “string: printf("%s",string); a. compiler error b. run-time errorc. no o/p, but no error d. creates bedefg 12. char string[8]="abedef" o/p: printf("%sn",string +3); a. abcdefg b. abe ux defg d. cdefg 13. main() { int I--3, j=2,k-0,m; mar teet+j| |++ks printf((n%d%aD", 1,j,k,m); a.-2301 b.-2311 2310 d.-2300 14. main() t int |; for(;;) i printf("Sd",le+) if(I>10) break; a. condition in a for-loop is mudt *. no error . ¢. 2; shad be dropped Shots 15. void goop ( int z[]);//prototypeint x[10]; which ois the correct way to call goop a. goop(x); b. goop(x{]); ©. goop(x[10]); d. goop(&x); e. goop(&x[]); 16. int a=3,b=17; a-b%a; b=ear5; printf(’a,b); a28 b.27 €.37 428 ® hone 18. how many time shetlo will be printed? FILE *fp=fopen("test. txt”,w) Fprintf(fp,"hello"); Fork(); * el b.2 c.0 d. none 19. int a; int b=0; while(a) { { aft=a-1; bre; 3 a &ba.0@15 b. 18 16 c. 0816 d. none 20, class A t public: static int a; A() {a=10}; hh int main() t Ab; Printf("%d",b.a); Return G; } will the program compile? ayes 1 UF n0 OOPS Written Test Questions OOPS 1,1s it possible for a member function of a class to activate another member function of the same class? a. no b. yes but only public member functions. c. Yes only private member functions HK Yes both public & private member functions can be activated2. Can 2 classes contain member functions with the same name? a. no b. yes but only if the 2 classes have the same name c. yes but only if the main program does not declare both kinds eves this is always allowed 3.what is the purpose of template functions? 2% to allow a single function to be used with varying types of arguments b. to hide the same name of the function from the linker c. to implement container classe d. to permit the use of the debugger without the gstabs flag 4. what kind of functions can access private member variables of a class a. friend function of a class b. private member functions of the class c¢, public member functions of the class All of the above f, none 5. what technique is used to step thro items of a container class? a. Copy constructor b. default constructor vawahow (irs) (dd time Biber Sriterstoe(amyoont rs! ) (8) rrome 4 ¢ 6. what is the term used to describe the situation when a derived class provides a function already provided in the base class ? a. inheritning .b¢ overriding . abstraction d, none . What r the characteristics of object in general . it has name properties . name properties behaviour c. itcan act on receiving a message d4 fe e. bite8. bundling data members together with the functions is called a. data hiding brencapsulation (ans) c. data morphism d. data binding 9.why is OO programming useful? a. It supports good s/w engs. Practices b. It promotes thinking abt s/w ina way that models the way we think & interact naturally c. Supports code reuse ,d. A &b ae bac 10. suppose tu want 2 develop 2 diff + operators that calculate & return an object of the same class. Which stmt is correct? a. 1 operator must be a frnd & the other must not b. 1 operator must be public & the other private .geOperators must have different parameter lists d, it is not possible 2 have 2 different + operators 11.what is inheritance? 4. a relationship in which the structure & functionality of a class (child ) is defined in terms of the structure & functionality of another(parent) b. a relationship in which the structure f& functionality of a class ( parent ) is defined in terms of the structure & functionality of another( child ) c. a relationship in which the structure &@ functionality of a class make calls 2 functionalty of another d. a relationship in which the structure of a class includes 1 or more instances of another oll of above bedween 42. what is relationship been’. a class & its public parent class vasa. b. has.a c. is implemented as a d, uses a e, becomes a13. how does inheritance relate 2 abstraction? \ 47 base Class is an abstraction of all its derived classes b. a derived class is an abstraction of all its base classes d. Base & derived classes are abstractions for each other ©. Inheritance prevents abstratien- abthrachong f. No relationship beta them BebWttn 14. why can't compiler hard-code direct calls to virtual functions? a. b coz hard coding the fn. Call wud slow compilation of the program too much b. b coz hard coding the fn. Call wud slow execution of the program too much ac-ti coz the correct fn. To call generally isn t know at compile time d. b coz virtual fns are always at compile-time so no run-time code is needed at all. e. Compiler does hard-code direct calls 2 virtual functions. 15. what is accessibility of a protected member of a base class which is inherited privately? 9 private: b coz the private inheritance makes everything frm the base class private in the derived class (ans) Grape City DBMS Interview Questions DBMS 1, Indexing must be applied on fields that are a. seldom refernced in query b. containing few unique columns \e-6n frequently searched columns d. changed frequently ®. A. The relational data model includes several types of data integrity .which type of data integrity is ensured by the use of a primary key? aentity integrityb. domain integrity c. referential integrity d. relational integrity 4. a student has 3 diff. Teachers . Each of these teachers has several students. Which type of relationship in relation model would effective represent this? a. 3 one-to-many relationships b. two many-to-one relationships (S-@single many-to -many relationshjips d. at least 2 many-to-many relationships 5. which of the following properties are required of a column or column sets for the column to function as a primary key? \a-tio nulls b. a clustered index c. anon-clustered index d. ther must be atleast 1 foreign key on tha same table. & 4. select a.pk fn b.zip c.city from a b c wher a.pkeb.pk tables a b & each contain 100 rows & the primary key for tables a & b is pk. What is the maxm. No. of rows that could be returned by query a. 100 b.0 c. 100 000 ~10 000 e. 1.000 000 8. which of the following is only used with a foreign key constraint ? a. primary key constraint b. the refereces clause c. a check constraint wy nene & above 9. which is used to return the no. of rows in a table? a. sel;ect all count from tablename b
You might also like
JAC Class 12 2013 Computer Science
PDF
No ratings yet
JAC Class 12 2013 Computer Science
5 pages
(WWW - Entrance-Exam - Net) - TEXAS Instruments Placement Sample Paper 5
PDF
No ratings yet
(WWW - Entrance-Exam - Net) - TEXAS Instruments Placement Sample Paper 5
43 pages
PPL Aakash
PDF
No ratings yet
PPL Aakash
24 pages
1 2 Questions Demo
PDF
No ratings yet
1 2 Questions Demo
74 pages
1) What Is Encapsulation?
PDF
No ratings yet
1) What Is Encapsulation?
11 pages
C++ QUESTION PAPER 2022 (Oct )
PDF
No ratings yet
C++ QUESTION PAPER 2022 (Oct )
15 pages
Ass 5
PDF
No ratings yet
Ass 5
11 pages
Computer 101
PDF
No ratings yet
Computer 101
22 pages
CS201 Quiz 3 Fall 2024 Lec 22 To 30 by Ali Khan
PDF
No ratings yet
CS201 Quiz 3 Fall 2024 Lec 22 To 30 by Ali Khan
11 pages
Week 6 Solution
PDF
No ratings yet
Week 6 Solution
15 pages
CPP October
PDF
No ratings yet
CPP October
20 pages
OOP Final Exam Fall 24 - Soln
PDF
No ratings yet
OOP Final Exam Fall 24 - Soln
21 pages
2019 August I-II
PDF
No ratings yet
2019 August I-II
98 pages
CT-2 QP - Set D - Answer
PDF
No ratings yet
CT-2 QP - Set D - Answer
12 pages
OODP All QP Sem 2
PDF
No ratings yet
OODP All QP Sem 2
10 pages
Part I: 22 Multiple Choice Questions (2 Points Each) : Mergesort
PDF
No ratings yet
Part I: 22 Multiple Choice Questions (2 Points Each) : Mergesort
16 pages
Assignment - DCA1203 - Set 1 & 2 - Ans
PDF
No ratings yet
Assignment - DCA1203 - Set 1 & 2 - Ans
10 pages
Exam 2
PDF
No ratings yet
Exam 2
6 pages
C++ Newly Edited
PDF
No ratings yet
C++ Newly Edited
13 pages
CPP Notes - 02
PDF
No ratings yet
CPP Notes - 02
30 pages
Nswers O Xercises
PDF
No ratings yet
Nswers O Xercises
9 pages
JAC Class 12 2018 Computer Science
PDF
No ratings yet
JAC Class 12 2018 Computer Science
4 pages
C193243 Cse-1221 PDF
PDF
No ratings yet
C193243 Cse-1221 PDF
28 pages
Unit1 Mcqs
PDF
No ratings yet
Unit1 Mcqs
34 pages
OODS University Paper 2024 SRM
PDF
No ratings yet
OODS University Paper 2024 SRM
4 pages
Rajanoopschap5and6 PDF
PDF
No ratings yet
Rajanoopschap5and6 PDF
11 pages
CT-2 QP - Set A - Answer
PDF
No ratings yet
CT-2 QP - Set A - Answer
10 pages
Final Solve
PDF
No ratings yet
Final Solve
10 pages
C++ Lab Manual
PDF
No ratings yet
C++ Lab Manual
38 pages
OOPS - Question Bank
PDF
No ratings yet
OOPS - Question Bank
85 pages
Object Oriented Programing Dec 2010,2013,2016
PDF
No ratings yet
Object Oriented Programing Dec 2010,2013,2016
40 pages
Object Oriented Programming Oops Lab Man
PDF
No ratings yet
Object Oriented Programming Oops Lab Man
39 pages
Bcs 031
PDF
No ratings yet
Bcs 031
25 pages
CPP Notes - 01
PDF
No ratings yet
CPP Notes - 01
30 pages
CS304 MCQS+ Notce For Final Term
PDF
No ratings yet
CS304 MCQS+ Notce For Final Term
34 pages
Object Oriented Programming Through C
PDF
No ratings yet
Object Oriented Programming Through C
272 pages
Oops in C++ INTERVIEW SERIES - 2
PDF
No ratings yet
Oops in C++ INTERVIEW SERIES - 2
24 pages
Fpli II Unitii MCQ
PDF
No ratings yet
Fpli II Unitii MCQ
43 pages
OOP 2 Answers
PDF
No ratings yet
OOP 2 Answers
19 pages
2015 CE104 University Paper
PDF
No ratings yet
2015 CE104 University Paper
4 pages
Answer BC0037 C++
PDF
No ratings yet
Answer BC0037 C++
20 pages
Imgtopdf 2909221401056
PDF
No ratings yet
Imgtopdf 2909221401056
39 pages
CS1020E Midterm 1314S2
PDF
No ratings yet
CS1020E Midterm 1314S2
12 pages
Special Topic ESA QP - Programming With C++ (UE19CS208B)
PDF
No ratings yet
Special Topic ESA QP - Programming With C++ (UE19CS208B)
4 pages
OOP Ques
PDF
No ratings yet
OOP Ques
10 pages
2019 Endsem Sol
PDF
No ratings yet
2019 Endsem Sol
13 pages
LAB Manual
PDF
No ratings yet
LAB Manual
40 pages
Inheritance Chapter 6 Computer Science With C++ Opt
PDF
No ratings yet
Inheritance Chapter 6 Computer Science With C++ Opt
0 pages
Object Oriented Programming C MCQs
PDF
No ratings yet
Object Oriented Programming C MCQs
8 pages
C++ Network 100
PDF
No ratings yet
C++ Network 100
8 pages
Chapter-6 Inheritance: Extending Classes: Public Yes Yes Private No No Protected Yes No
PDF
No ratings yet
Chapter-6 Inheritance: Extending Classes: Public Yes Yes Private No No Protected Yes No
20 pages
(WWW - Entrance-Exam - Net) - Grapecity Placement Sample Paper 2
PDF
No ratings yet
(WWW - Entrance-Exam - Net) - Grapecity Placement Sample Paper 2
11 pages
Fill Data: Qno O1 O2 O3 O4 Ans1 Ans2 Ans3 Ans4
PDF
No ratings yet
Fill Data: Qno O1 O2 O3 O4 Ans1 Ans2 Ans3 Ans4
10 pages
External
PDF
No ratings yet
External
3 pages
Object Oriented Programming: Time: 2 HRS.) (Marks: 75
PDF
No ratings yet
Object Oriented Programming: Time: 2 HRS.) (Marks: 75
16 pages
Oct 24 Bba (CA) CPP Solution
PDF
No ratings yet
Oct 24 Bba (CA) CPP Solution
11 pages
KIIT University PPL (IT 401) Paper
PDF
No ratings yet
KIIT University PPL (IT 401) Paper
5 pages
ZA0902 Object Oriented Programming and C++
PDF
No ratings yet
ZA0902 Object Oriented Programming and C++
3 pages
Counterexamples in Analysis
From Everand
Counterexamples in Analysis
Bernard R. Gelbaum
3.5/5 (19)
Introduction to PHP, Part 2, Second Edition
From Everand
Introduction to PHP, Part 2, Second Edition
Adam Majczak
No ratings yet
Documents
Computers