Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “Static Data Members”.
1. Which among the following best defines static variables members?
a) Data which is allocated for each object separately
b) Data which is common to all the objects of a class
c) Data which is common to all the classes
d) Data which is common to a specific method
View Answer
Answer: b
Explanation: The static data members are made common to all the object of a class. They doesn’t change from object to object. Those are property of class rather than of any individual object.
2. Which keyword should be used to declare static variables?
a) static
b) stat
c) common
d) const
View Answer
Answer: a
Explanation: The keyword used to declare static variables is static. This is must be used while declaring the static variables. The compiler can make variables static if and only if they are mentioned with static keyword.
3. Any changes made to static data member from one member function _____________
a) Is reflected to only the corresponding object
b) Is reflected to all the variables in a program
c) Is reflected to all the objects of that class
d) Is constant to that function only
View Answer
Answer: c
Explanation: The changes made from any function to static data member will be a common change for all the other objects also. If the change is made with respect to one object and change is printed from another object, the result will be same.
4. Which is the correct syntax for declaring static data member?
a) static mamberName dataType;
b) dataType static memberName;
c) memberName static dataType;
d) static dataType memberName;
View Answer
Answer: d
Explanation: The syntax must firstly be mentioned with the keyword static. Then the data type of the member followed by the member name should be given. This is general form of declaring static data members.
5. The static data member ______________________
a) Must be defined inside the class
b) Must be defined outside the class
c) Must be defined in main function
d) Must be defined using constructor
View Answer
Answer: b
Explanation: The static data members must be defined outside the class. Since these are common to all the objects and should be created only once, they must not be defined in the constructor.
6. The syntax for defining the static data members is __________
a) dataType className :: memberName = value;
b) dataType className : memberName = value;
c) dataType className . memberName = value;
d) dataType className -> memberName =value;
View Answer
Answer: a
Explanation: The syntax doesn’t contain the static keyword. Since it is already been declared as static inside the class. The data type and the corresponding class name must be there to allocate the variable to a class. The value is assigned using scope resolution operator for the member name.
7. If static data members have to be used inside a class, those member functions _______________
a) Must not be static member functions
b) Must not be member functions
c) Must be static member functions
d) Must not be member function of corresponding class
View Answer
Answer: c
Explanation: Only the static member functions can access the static data members. The definition of static members is made common and hence the member function should be capable of manipulating the static data members.
8. The static data member __________________________
a) Can be accessed directly
b) Can be accessed with any public class name
c) Can be accessed with dot operator
d) Can be accessed using class name if not using static member function
View Answer
Answer: d
Explanation: The static data members can be accessed using the class name also. If the member functions is not used or is not to be used then we can call the static data members directly by using its corresponding class name.
9. Which among the following is the correct syntax to access static data member without using member function?
a) className -> staticDataMember;
b) className :: staticDataMember;
c) className : staticDataMember;
d) className . staticDataMember;
View Answer
Answer: b
Explanation: For accessing the static data members without using the static member functions, the class name can be used. The class name followed by scope resolution, indicating that static data members is member of this class, and then the data member name.
10. Which data members among the following are static by default?
a) extern
b) integer
c) const
d) void
View Answer
Answer: c
Explanation: The const data members of any class are made static by default. This is an implicit meaning given by the compiler to the member. Since const values won’t change from object to object, hence are made static instead.
11. What is the output of the following program?
class Test
{
private: static int x;
public: static void fun()
{
cout << ++x << “ ”;
}
};
int Test :: x =20;
void main()
{
Test x;
x.fun();
x.fun();
}
a) 20 22
b) 20 21
c) 21 22
d) 22 23
View Answer
Answer: c
Explanation: The static member is initialized with 20. Then the function is called which used pre-increment and printed value of x. The function is called twice. Hence we get 21 22 as output.
12. Whenever any static data member is declared in a class ______________________
a) Only one copy of the data is created
b) New copy for each object is created
c) New memory location is allocated with each object
d) Only one object uses the static data
View Answer
Answer: a
Explanation: The static data is same for all the objects. Instead of creating the same data each time an object is created, the compiler created only one data which is accessed by all the objects of the class. This saves memory and reduces redundancy.
13. If object of class are created, then the static data members can be accessed ____________
a) Using dot operator
b) Using arrow operator
c) Using colon
d) Using dot or arrow operator
View Answer
Answer: d
Explanation: The static data members can be accessed in usual way as other members are accessed using the objects. The dot operator is used generally. Arrow can be used with the pointers.
14. What will be the output of the following program?
class Test
{
public: Test()
{
cout << "Test's Constructor is Called " << endl;
}
};
class Result
{
static Test a;
public:
Result()
{
cout << "Result's Constructor is Called " << endl;
}
};
void main()
{
Result b;
}
a) Test’s Constructor is Called
b) Result’s Constructor is Called
c) Result’s Constructor Called Test’s Constructor is Called
d) Test’s Constructor Called Result’s Constructor is Called
View Answer
Answer: b
Explanation: The output is the message printed from the constructor of class Result. There is no inheritance used hence only one constructor is called. Since static members are declared once in class declaration and are not defined. The constructor of class Test will not be called.
15. Which among the following is wrong syntax related to static data members?
a) className :: staticDataMember;
b) dataType className :: memberName =value;
c) static dataType memberName;
d) className : dataType -> memberName;
View Answer
Answer: d
Explanation: The syntax given in option d doesn’t belong to any particular declaration or definition. First one is to access the static members using the class name. Second is to define the static data outside the class. Third syntax id to declare a data member as static in a class.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming Interview Questions and Answers for Experienced people focuses on “Passing Object to Functions”.
1. Passing object to a function _______________
a) Can be done only in one way
b) Can be done in more than one ways
c) Is not possible
d) Is not possible in OOP
View Answer
Answer: b
Explanation: The objects can be passed to the functions and this requires OOP concept because objects are main part of OOP. The objects can be passed in more than one way to a function. The passing depends on how the object have to be used.
2. The object ________________
a) Can be passed by reference
b) Can be passed by value
c) Can be passed by reference or value
d) Can be passed with reference
View Answer
Answer: c
Explanation: The objects can be passed by reference if required to use the same object. The values can be passed so that the main object remains same and no changes are made to it if the function makes any changes to the values being passed.
3. Which symbol should be used to pass the object by reference in C++?
a) &
b) @
c) $
d) $ or &
View Answer
Answer: a
Explanation: The object to be passed by reference to the function should be preceded by & symbol in the argument list syntax of the function. This indicates the compiler not to use new object. The same object which is being passed have to be used.
4. If object is passed by value ______________
a) Copy constructor is used to copy the values into another object in the function
b) Copy constructor is used to copy the values into temporary object
c) Reference to the object is used to access the values of the object
d) Reference to the object is used to created new object in its place
View Answer
Answer: a
Explanation: The copy constructor is used. This constructor is used to copy the values into a new object which will contain all the values same as that of the object being passed but any changes made to the newly created object will not affect the original object.
5. Pass by reference of an object to a function _______________
a) Affects the object in called function only
b) Affects the object in prototype only
c) Affects the object in caller function
d) Affects the object only if mentioned with & symbol with every call
View Answer
Answer: c
Explanation: The original object in the caller function will get affected. The changes made in the called function will be same in the caller function object also.
6. Copy constructor definition requires __________________
a) Object to be passed by value
b) Object not to be passed to it
c) Object to be passed by reference
d) Object to be passed with each data member value
View Answer
Answer: c
Explanation: The object must be passed by reference to a copy constructor. This is to avoid the out of memory error. The constructors keeps calling itself, if not passed by reference, and goes out of memory.
7. What is the type of object that should be specified in the argument list?
a) Function name
b) Object name itself
c) Caller function name
d) Class name of object
View Answer
Answer: d
Explanation: The type of object is the class itself. The class name have to be specified in order to pass the objects to a function. This allows the program to create another object of same class or to use the same object that was passed.
8. If an object is passed by value, _________________
a) Temporary object is used in the function
b) Local object in the function is used
c) Only the data member values are used
d) The values are accessible from the original object
View Answer
Answer: b
Explanation: When an object is called by values, copy constructor is called and object is copied to the local object of the function which is mentioned in the argument list. The values gets copied and are used from the local object. There is no need to access the original object again.
9. Can data members be passed to a function using the object?
a) Yes, it can be passed only inside class functions
b) Yes, only if the data members are public and are being passed to a function outside the class
c) No, can’t be passed outside the class
d) No, can’t be done
View Answer
Answer: b
Explanation: The data members can be passed with help of object but only if the member is public. The object will obviously be used outside the class. The object must have access to the data member so that its value or reference is used outside the class which is possible only if the member is public.
10. What exactly is passed when an object is passed by reference?
a) The original object name
b) The original object class name
c) The exact address of the object in memory
d) The exact address of data members
View Answer
Answer: c
Explanation: The location of the object, that is, the exact memory location is passed, when the object is passed by reference. The pass by reference is actually a reference to the object that the function uses with another name to the same memory location as the original object uses.
11. If the object is not to be passed to any function but the values of the object have to be used then?
a) The data members should be passed separately
b) The data members and member functions have to be passed separately
c) The values should be present in other variables
d) The object must be passed
View Answer
Answer: a
Explanation: The data members can be passed separately. There is no need to pass whole object, instead we can use the object to pass only the required values.
12. Which among the following is true?
a) More than one object can’t be passed to a function
b) Any number of objects can be passed to a function
c) Objects can’t be passed, only data member values can be passed
d) Objects should be passed only if those are public in class
View Answer
Answer: b
Explanation: There is no restriction on passing the number of objects to a function. The operating system or the compiler or environment may limit the number of arguments. But there is no limit on number of objects till that limit.
13. What will be the output if all necessary code is included (Header files and main function)?
void test (Object &y)
{
y = "It is a string";
}
void main()
{
Object x = null;
test (x);
System.out.println (x);
}
a) Run time error
b) Compile time error
c) Null
d) It is a string
View Answer
Answer: d
Explanation: This is because the x object is passed by reference. The changes made inside the function will be applicable to original function too.
14. In which type is new memory location will be allocated?
a) Only in pass by reference
b) Only in pass by value
c) Both in pass by reference and value
d) Depends on the code
View Answer
Answer: b
Explanation: The new memory location will be allocated only if the object is passed by value. Reference uses the same memory address and is denoted by another name also. But in pass by value, another object is created and new memory space is allocated for it.
15. Pass by reference and pass by value can’t be done simultaneously in a single function argument list.
a) True
b) False
View Answer
Answer: b
Explanation: There is no condition which specifies that only the reference pass or values pass is allowed. The argument list can contain one reference pass and another value pass. This helps to manipulate the objects with functions more easily.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming for Interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming Assessment Questions and Answers focuses on “Pointer to Objects”.
1. Which language among the following doesn’t allow pointers?
a) C++
b) Java
c) Pascal
d) C
View Answer
Answer: b
Explanation: The concept of pointers is not supported in Java. The feature is not given in the language but can be used in some ways explicitly. Though this pointer is supported by java too.
2. Which is correct syntax for declaring pointer to object?
a) className* objectName;
b) className objectName;
c) *className objectName;
d) className objectName();
View Answer
Answer: a
Explanation: The syntax must contain * symbol after the className as the type of object. This declares an object pointer. This can store address of any object of the specified class.
3. Which operator should be used to access the members of the class using object pointer?
a) Dot operator
b) Colon to the member
c) Scope resolution operator
d) Arrow operator
View Answer
Answer: d
Explanation: The members can be accessed from the object pointer by using arrow operator. The arrow operator can be used only with the pointer of class type. If simple object is declared, it must use dot operator to access the members.
4. How does compiler decide the intended object to be used, if more than one object are used?
a) Using object name
b) Using an integer pointer
c) Using this pointer
d) Using void pointer
View Answer
Answer: c
Explanation: This pointer denotes the object, in which it is being used. If member function is called with respect to one object then this pointer refers to the same object members. It can be used when members with same name are involved.
5. If pointer to an object is declared __________
a) It can store any type of address
b) It can store only void addresses
c) It can only store address of integer type
d) It can only store object address of class type specified
View Answer
Answer: d
Explanation: The address of only the specified class type can get their address stored in the object pointer. The addresses doesn’t differ but they do differ for the amount and type of memory required for objects of different classes. Hence same class object pointer should be used.
6. What is the size of an object pointer?
a) Equal to size of any usual pointer
b) Equal to size of sum of all the members of object
c) Equal to size of maximum sized member of object
d) Equal to size of void
View Answer
Answer: a
Explanation: The size of object pointer is same as that of any usual pointer. This is because only the address have to be stored. There are no values to be stored in the pointer.
7. A pointer _________________
a) Can point to only one object at a time
b) Can point to more than one objects at a time
c) Can point to only 2 objects at a time
d) Can point to whole class objects at a time
View Answer
Answer: a
Explanation: The object pointer can point to only one object at a time. The pointer will be able to store only one address at a time. Hence only one object can be referred.
8. Pointer to a base class can be initialized with the address of derived class, because of _________
a) derived-to-base implicit conversion for pointers
b) base-to-derived implicit conversion for pointers
c) base-to-base implicit conversion for pointers
d) derived-to-derived implicit conversion for pointers
View Answer
Answer: a
Explanation: It is an implicit rule defined in most of the programming languages. It permits the programmer to declare a pointer to the derived class from a base class pointer. In this way the programmer doesn’t have to declare object for derived class each time it is required.
9. Can pointers to object access the private members of the class?
a) Yes, always
b) Yes, only if it is only pointer to object
c) No, because objects can be referenced from another objects too
d) No, never
View Answer
Answer: d
Explanation: The pointers to an object can never access the private members of the class outside the class. The object can indirectly use those private members using member functions which are public in the class.
10. Is name of an array of objects is also a pointer to object?
a) Yes, always
b) Yes, in few cases
c) No, because it represents more than one object
d) No, never
View Answer
Answer: a
Explanation: The array name represents a pointer to the object. The name alone can represent the starting address of the array. But that also represents an array which is in turn stored in a pointer.
11. Which among the following is true?
a) The pointer to object can hold address only
b) The pointer can hold value of any type
c) The pointer can hold only void reference
d) The pointer can’t hold any value
View Answer
Answer: a
Explanation: The pointer to an object can hold only the addresses. Address of any other object of same class. This allows the programmer to link more than one objects if required.
12. Which is the correct syntax to call a member function using pointer?
a) pointer->function()
b) pointer.function()
c) pointer::function()
d) pointer:function()
View Answer
Answer: a
Explanation: The pointer should be mentioned followed by the arrow operator. Arrow operator is applicable only with the pointers. Then the function name should be mentioned that is to be called.
13. If a pointer to an object is created and the object gets deleted without using the pointer then __________
a) It becomes void pointer
b) It becomes dangling pointer
c) It becomes null pointer
d) It becomes zero pointer
View Answer
Answer: b
Explanation: When the address pointed by the object pointer gets deleted, the pointer now points to an invalid address. Hence it becomes a dangling pointer. It can’t be null or void pointer since it doesn’t point to any specific location.
14. How can the address stored in the pointer be retrieved?
a) Using * symbol
b) Using $ symbol
c) Using & symbol
d) Using @ symbol
View Answer
Answer: c
Explanation: The & symbol must be used. This should be done such that the object should be preceded by & symbol and then the address should be stored in another variable. This is done to get the address where the object is stored.
15. What should be done to prevent changes that may be made to the values pointed by the pointer?
a) Usual pointer can’t change the values pointed
b) Pointer should be made virtual
c) Pointer should be made anonymous
d) Pointer should be made const
View Answer
Answer: d
Explanation: The pointer should be declared as a const type. This prevents the pointer to change any value that is being pointed from it. This is a feature that is made to access the values using pointer but to make sure that pointer doesn’t change those values accidently.
16. References to object are same as pointers of object.
a) True
b) False
View Answer
Answer: b
Explanation: The references are made to object when the object is created and initialized with another object without calling any constructor. But the object pointer must be declared explicitly using * symbol that will be capable of storing some address. Hence both are different.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming Assessment Questions, here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “Default Arguments”.
1. What are default arguments?
a) Arguments which are not mandatory to be passed
b) Arguments with default value that aren’t mandatory to be passed
c) Arguments which are not passed to functions
d) Arguments which always take same data value
View Answer
Answer: b
Explanation: The arguments which are assigned with some default value. Since some value is already given, it is not mandatory to pass those arguments. They can be used directly.
2. Which is the correct condition for the default arguments?
a) Those must be declared as last arguments in argument list
b) Those must be declared first in the argument list
c) Those can be defined anywhere in the argument list
d) Those are declared inside the function definition
View Answer
Answer: a
Explanation: The default arguments must be declared at last in the argument list. This is to ensure that the arguments doesn’t create ambiguity. The normal arguments should be passed first.
3. If a member function have to be made both zero argument and parameterized constructor, which among the following can be the best option?
a) Two normal and one default argument
b) At least one default argument
c) Exactly one default argument
d) Make all the arguments default
View Answer
Answer: d
Explanation: All the arguments must be made default. This will make sure that none of the arguments are mandatory to be passed. Which in turn means that the function can work without any argument and can be passed with arguments too.
4. Which among the following function can be called without arguments?
a) void add(int x, int y=0)
b) void add(int=0)
c) void add(int x=0, int y=0)
d) void add(char c)
View Answer
Answer: c
Explanation: For the function to be called without arguments, either it must have zero arguments or it must have all the default arguments. Here the function in option void add(int x=0, int y=0) have all the default arguments and hence can be called directly with zero argument.
5. If a function have all the default arguments but still some values are passed to the function then ______________
a) The function will use the values passed to it
b) The function will use the default values as those are local
c) The function can use any value whichever is higher
d) The function will choose the minimum values
View Answer
Answer: a
Explanation: The function will use the values passed explicitly to it. The default values will be ignored. The default values are used only in case the values are not passed explicitly to the function.
6. Which among the following is correct?
a) void test(int x=0, int y, int z=0)
b) void test(int x=0, int=0)
c) void test(int x, int y=0)
d) void test(int x=’c, int y)
View Answer
Answer: c
Explanation: The default arguments must be mentioned at last in the argument list. Also, the type of values assigned must match with the argument type. All the default arguments must be mentioned at last, none of the normal arguments should come in between the default arguments list.
7. What function will be called with the independent syntax “test(5,6,7);”?
a) void test(int x, int y)
b) void test(int x=0, int y, int z)
c) int test(int x=0, y=0, z=0)
d) void test(int x, int y, int z=0)
View Answer
Answer: d
Explanation: There are three arguments that are getting passed to the function test(). Only the last option have all the default argument at last in the argument list. And the total number of the arguments is three. The third option is wrong because the return type is int and the syntax given is independent which means it doesn’t return any value.
8. Which among the following is a wrong call to the function void test(int x, int y=0, int z=0)?
a) test(5,6,7);
b) test(5);
c) test();
d) test(5,6);
View Answer
Answer: c
Explanation: The function must be passed with at least one argument. There is two default arguments and one normal argument which must be passed with some value. Hence the third call to the function is wrong as it doesn’t pass even a single parameter to the function
9. Default arguments are _________________________
a) Only allowed in the parameter list of the function declaration
b) Only allowed in the return type of the function declaration
c) Only allowed with the class name definition
d) Only allowed with the integer type values
View Answer
Answer: a
Explanation: The default arguments are only allowed in the parameter list of the function arguments. This rule was not applicable in the beginning versions of c++ but later from c++ 14th version it has been implemented. This is the only way to use default arguments.
10. Which among the following is false for default arguments?
a) Those are not allowed with a declaration of pointer to functions
b) Those are not allowed with the reference to functions
c) Those are not allowed with the typedef declarations
d) Those are allowed with pointer and reference to function declaration
View Answer
Answer: d
Explanation: The statements given are true because that is a feature given to make the programming more flexible and have some security with accidental changes at same time. The last option is false because it is not a rule defined. It is an opposite statement to the rules defined for default arguments.
11. The non-template functions can be added with default arguments to already declared functions ____________________
a) If and only if the function is declared again in the same scope
b) If and only if the function is declared only once in the same scope
c) If and only if the function is declared in different scope
d) If and only if the function is declared twice in the program
View Answer
Answer: a
Explanation: The non-template functions can also be added with default arguments. This can be done even if the functions were defined earlier. This is because the call to the function won’t be affected. The function can still be used in the same way as it was used earlier.
12. The using declaration __________
a) Doesn’t carry over the default values
b) Carries over the known default arguments
c) Carries over only the normal arguments
d) Carries over only few default arguments
View Answer
Answer: b
Explanation: The using-declaration carries over all the known default arguments. This is a common feature as the usage doesn’t gets affected even if the default arguments are added. This comes under flexible programming.
13. The names given to the default arguments are only looked up and ________________ and are bound during declaration.
a) Checked for availability
b) Checked for random access
c) Checked for accessibility
d) Checked for feasibility
View Answer
Answer: c
Explanation: The names given to the default arguments are bound at time of declaration but are only checked for accessibility and to get bounded. This is mainly to bind those members during declaration.
14. The default argument get bound during declaration ________________
a) And are never executed
b) And are executed simultaneously
c) But are executed only if priority is given
d) But are executed during function call
View Answer
Answer: d
Explanation: The default argument are bound at the time of declaration. That is an implicit functioning. But those are executed only when the function is called. Otherwise, those will never get executed.
15. The virtual function overrides ____________
a) Do not acquire base class declaration of default arguments
b) Do acquire base class declaration of default arguments
c) Do not link with the default arguments of base class
d) Do link with the default argument but only of derived classes
View Answer
Answer: a
Explanation: The virtual function overrides do not acquire the base class declaration of default arguments. Even if a call to the virtual function is made, static type of the object decides the default arguments to be used.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “Upcasting”.
1. What is upcasting?
a) Casting subtype to supertype
b) Casting super type to subtype
c) Casting subtype to super type and vice versa
d) Casting anytype to any other type
View Answer
Answer: a
Explanation: The upcasting concept includes only the casting of subtypes to the super types. This casting is generally done implicitly. Smaller size types can fit into larger size types implicitly.
2. Which among the following is true for upcasting in inheritance?
a) Downward to the inheritance tree
b) Upward to the inheritance tree
c) Either upward or downward
d) Doesn’t apply on inheritance
View Answer
Answer: b
Explanation: The upcasting concept in inheritance is always applied upward the inheritance tree. The derived class objects can be type casted to any of its parent class type. Since is a relationship applies in general inheritance.
3. Which among the following is safe?
a) Upcasting
b) Downcasting
c) Both upcasting and downcasting
d) If upcasting is safe then downcasting is not, and vice versa
View Answer
Answer: a
Explanation: The upcasting is always safe since the derived type or the smaller type is converted into the base type or the larger size. This results in allocating a smaller size data into bigger type data. No data is lost in casting, hence safe.
4. Which among the following is the best situation to use upcasting?
a) For general code dealing with only subtype
b) For general code dealing with only supertype
c) For general code dealing with both the supertype and subtype
d) For writing a rigid code with respect to subtype
View Answer
Answer: b
Explanation: When a general code has to be written where we use only the supertype object or the data of bigger size, then upcasting would be the best option. Since the whole code will require only the supertype name references.
5. Which property is shown most when upcasting is used?
a) Code reusability
b) Code efficiency
c) Complex code simple syntax
d) Encapsulation
View Answer
Answer: c
Explanation: The code written using upcasting mostly shows complex code in simpler syntax features. This is because the upcasting concept can be applied as polymorphism and to group the similar type of objects.
6. Upcasting and downcasting objects are the same as casting primitive types.
a) True
b) False
View Answer
Answer: b
Explanation: It is a bit confusing concept since both casting concepts are different. Primitive casting depends on the type and size of data being typecast. Whereas in objects casting, the classes and inheritance order plays a big role.
7. Which casting among the following is allowed for the code given below?
class A
{
public :int a;
}
class B:public A
{
int b;
}
main()
{
B b=new A(); //casting 1
A a=new B(); //casting 2
}
a) Casting 1
b) Casting 2
c) casting 1 and casting 2
d) casting 1 nor casting 2
View Answer
Answer: b
Explanation: The casting 2 is correct. The objects casting must be done from derived class object to a parent class object. That is, the object of the superclass can be made an object of subclass only. Vice versa is not possible.
8. If multiple inheritance is implemented, which upcasting will be correct?
a) Upcast to first base class listed in inheritance
b) Upcast to send base class listed in inheritance
c) Upcast to any base class
d) Upcast is not possible
View Answer
Answer: c
Explanation: The upcasting of derived class object is possible to any base class. This is because the base class object can represent any of its derived classes using upcasting.
9. If class C inherits class B and class B inherits class A ________________
a) Class C object can be upcasted to object of class B only
b) Class C object can be upcasted to object of class A only
c) Class C object can be upcasted to object of either class A or B
d) Class C object can’t be upcasted
View Answer
Answer: c
Explanation: Both class A and B are parent classes of class C. Class C object hence can be upcasted to any of those class objects. It is not compulsory to upcast to nearest parent.
10. Upcasting is _____________________ without an explicit type cast.
a) Always allowed for public inheritance
b) Always allowed for protected inheritance
c) Always allowed for private inheritance
d) Not allowed
View Answer
Answer: a
Explanation: The public inheritance shows the most flexible is-a relationship. Hence explicit type casting is not required. Implicit type casting is done by the compiler.
11. Which concept is needed because of implicit type casting use?
a) Static binding
b) Dynamic binding
c) Compile time binding
d) Source code binding
View Answer
Answer: b
Explanation: Since the implicit type casting allows casting of a base class pointer to refer to its derived class object or even base class object. We need dynamic type casting so that the references can be resolved during execution of program.
12. When are the pointer types known for upcasting the objects?
a) Compile time
b) Runtime
c) Source code build time
d) Doesn’t apply to pointer types
View Answer
Answer: a
Explanation: The pointer or reference types are known at compile time for the upcasting of an object. This is because the addresses must be known for casting the derived class to base class object.
13. When are the object type known for upcasting the objects?
a) Compile time
b) Runtime
c) Source code build time
d) Doesn’t apply to objects directly
View Answer
Answer: b
Explanation: The upcasting with objects directly requires runtime resolving. The objects are fixed and address are allocated at compile time. But the execution of a program requires runtime knowledge of object types, for implicit type cast.
14. If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?
a) Parent *p=child;
b) Parent *p=*child;
c) Parent *p=&child
d) Parent *p=Child();
View Answer
Answer: c
Explanation: The syntax must contain the base class name first. So that the parent class object pointer can be declared. Then the object is assigned with the derived class object with & symbol. & symbol is added to get the address of the derived class object.
15. Which among the following is true?
a) Upcasting is possible only for single level inheritance
b) Upcasting is possible only for multilevel inheritance
c) Upcasting is possible only for multiple inheritance
d) Upcasting is possible for any type of inheritance
View Answer
Answer: d
Explanation: The type of inheritance doesn’t matter with the upcasting concept. Upcasting applies to all types of inheritance. Any derived class object can be upcasted to any of its base class object.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “New Operator”.
1. What is the new operator?
a) Allocates memory for an object or array
b) Allocates memory for an object or array and returns a particular pointer
c) Used as return type when an object is created
d) Used to declare any new thing in a program
View Answer
Answer: b
Explanation: The new keyword is used to allocate memory of an object or array. The new object or array can be of any type. Then it returns a suitable non zero pointer to the object.
2. Microsoft C++ Components extensions support new keyword to _____________
a) Modify a vtable
b) Replace a vtable slot entry
c) Add new vtable slot entries
d) Rearrange vtable slot entries
View Answer
Answer: c
Explanation: The new keyword is used for adding new vtable slot entries. This is an additional feature in Microsoft C++. It can use predefined class object for this work.
3. What happens when new fails?
a) Returns zero always
b) Throws an exception always
c) Either throws an exception or returns zero
d) Terminates the program
View Answer
Answer: c
Explanation: While creating new objects, the new operator may fail because of memory errors or due to permissions. At that moment the new operator returns zero or it may throw an exception. The exception can be handled as usual.
4. If new throws an error, which function can be called to write a custom exception handler?
a) _set_handler
b) _new_handler
c) _handler_setter
d) _set_new_handler
View Answer
Answer: d
Explanation: If the default exception handler has to be replaced by a user defined handler, we can call _set_new_handler run-time library function with the function name as an argument. This lets the programmer to give a custom definition for handling new operator failure.
5. In C++, if new operator is used, when is the constructor called?
a) Before the allocation of memory
b) After the allocation of memory
c) Constructor is called to allocate memory
d) Depends on code
View Answer
Answer: b
Explanation: The constructor function is called after the allocation of memory. In C++ the feature works in a bit different way. The memory for all the data members is allocated first and then the constructor function is called to finalize the memory allocated.
6. Which among the following is correct syntax to declare a 2D array using new operator?
a) char (*pchar)[10] = new char[][10];
b) char (pchar) = new char[][10];
c) char (*char) = new char[10][];
d) char (*char)[][10]= new char;
View Answer
Answer: a
Explanation: The new operator usage to declare a 2D array requires a pointer and size of array to be declared. Data type and then the pointer with size of array. The left index can be left blank or any variable can be assigned to it.
7. For declaring data by using new operator ____________________
a) Type name can’t contain const
b) Type name can’t contain volatile
c) Type name can’t contain class declarations
d) Type name can’t contain const, volatile, class declaration or enumerations
View Answer
Answer: d
Explanation: The declaration of any data where we use new operator, any of the mentioned types are not allowed. This is because the new operator allocated memory based on the type of data which can be allocated dynamically.
8. The new operator _____________
a) Can allocate reference types too
b) Doesn’t allocate reference types
c) Can allocate reference to objects
d) Doesn’t allocate any data
View Answer
Answer: b
Explanation: The new operator doesn’t allocate reference types. This is because the reference types are not objects. The new operator is used to allocate memory to the direct objects.
9. Which among the following is true?
a) New operator can’t allocate functions but pointer to functions can be allocated
b) New operator can allocate functions as well as pointer to functions
c) New operator can allocate any type of functions
d) New operator is not applicable with functions allocation
View Answer
Answer: a
Explanation: The new operator can’t allocate functions but can allocate pointer to the functions. This is a security feature as well as to reduce the ambiguity in code. The new keyword is not given functionality to directly allocate any function.
10. Which among the following is added in grammar of new operator?
a) Finalize
b) Arg
c) Initializer
d) Allocator
View Answer
Answer: c
Explanation: The new operator grammar is added with an initializer field. This can be used to initialize an object with a user defined constructor. Hence can allocate memory as intended by the programmer.
11. Initializers __________________
a) Are used for specifying arrays
b) Are used to defined multidimensional arrays
c) Can’t be specified for arrays
d) Can’t be specified for any data
View Answer
Answer: c
Explanation: The initializers can’t be specified for arrays. The initializers can create arrays of object if and only if the class has a default constructor. That is a zero argument constructor so that it can be called without any argument.
12. The objects allocated using new operator ________________
a) Are destroyed when they go out of scope
b) Are not destroyed even if they go out of scope
c) Are destroyed anytime
d) Are not destroyed throughout the program execution
View Answer
Answer: b
Explanation: It is not necessary that the objects get destroyed when they go out of scope if allocated by using new operator. This is because new operator returns a pointer to object that it had allocated. A suitable pointer with proper scope should be defined by the programmer explicitly.
13. The new operator _________________
a) Invokes function operator new
b) Doesn’t invoke function operator new
c) Invokes function operator only if required
d) Can’t invoke function operator new implicitly
View Answer
Answer: a
Explanation: The new operator invokes function operator new. This is done to allocate the storage to an object. ::operator new is called for storage allocation implicitly.
14. If a new operator is defined for a class and still global new operator have to be used, which operator should be used with the keyword new?
a) Colon
b) Arrow
c) Dot
d) Scope resolution
View Answer
Answer: d
Explanation: As usual, scope resolution operator is used to get the scope of parent or the global entities. Hence we can use scope resolution operator with the new operator to call the global new operator even if new operator is defined for the class explicitly.
15. How does compiler convert “::operator new” implicitly?
a) ::operator new( sizeof( type ) )
b) ::operator new( sizeof( ) )
c) new operator :: type sizeof( type )
d) new sizeof( type ) operator
View Answer
Answer: a
Explanation: The compiler implicitly converts the syntax so that the instruction can be understood by the processor and proper machine code can be generated. The conversion is done implicitly and no explicit syntax is required.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “Automatic Variable”.
1. What are automatic variables?
a) Global variables
b) Implicit/temporary variables
c) Local variables
d) System variables
View Answer
Answer: c
Explanation: The local variables are also known as automatic variables. The variables in any local scope that are created and destroyed as the program executes its scope.
2. The memory for automatic variables ___________________
a) Have to be allocated and deallocated explicitly
b) Are allocated and deallocated automatically
c) Is never actually allocated
d) Are never safe
View Answer
Answer: b
Explanation: The memory is allocated and deallocated automatically for the automatic variables. As soon as the variable comes in scope, the memory is allocated. The variables are destroyed as soon as those go out of scope.
3. Scope of an automatic variable _______________
a) Is actually the whole program
b) Is actually never fixed
c) Is always equal to the whole program execution
d) Is actually function or block in which it is defined
View Answer
Answer: d
Explanation: The automatic variables scope is limited only within the block or the function where those are defined. This is the property of all the automatic variables.
4. Which among the following is true for automatic variables in general?
a) Automatic variables are invisible to called function
b) Automatic variables are always visible to the called function
c) Automatic variables can’t interact with the called function
d) Automatic variables can’t be variable
View Answer
Answer: a
Explanation: The automatic variables are hidden from the called function. Even if passed by reference or address, the address of the variable is used and not the actual variable of calling function. Automatic variables can be const or variable.
5. If an automatic variable is created and then a function is called then ________________
a) The automatic variable created gets destroyed
b) The automatic variable doesn’t get destroyed
c) The automatic variable may or may not get destroyed
d) The automatic variable can’t be used in this case
View Answer
Answer: b
Explanation: The automatic variables are saved till the called function gets executed. This is done so as to ensure that the program can continue its execution after the called function is returned. The automatic variables gets destroyed only if those go out of scope.
6. Where are the automatic variables stored if another function is called in between the execution of the program?
a) Heap
b) Queue
c) Stack
d) Temp variable
View Answer
Answer: c
Explanation: All the automatic variables are stored in a new stack entry as soon as their scope is created. If another function is called, the present data is saved in stack and new entry in stack is made for the called function. When the function returns, the automatic variables are used again from where those were left.
7. The static variables of a function ________________
a) Are also automatic variables
b) Are not automatic variables
c) Are made automatic by default
d) Can be made automatic explicitly
View Answer
Answer: b
Explanation: The static members can’t be automatic. This is because the automatic variables are created and destroyed with each call to a specific function. But the static members remain throughout the execution of program once created.
8. All variables declared within a block ____________________
a) Are not always automatic
b) Can be made non-automatic
c) Are static by default
d) Are automatic by default
View Answer
Answer: d
Explanation: The variables declared inside a block, are make automatic by default. This is to ensure that the variables get destroyed when not required. The variables remain live only till those are required, the life is dependent on the scope of a variable.
9. What values does uninitialized automatic variables contain?
a) Null value
b) Void value
c) Undefined/Garbage
d) Zero value
View Answer
Answer: c
Explanation: The automatic variable which are not initialized, contain garbage value. If we just declare a variable and try to print its value, the result is some unknown value. The value is garbage as that was not expected value.
10. Constructor of automatic variables is called ____________________
a) When execution reaches the place of declaration of automatic variables
b) When the program is compiled
c) When the execution is just started
d) Just before the execution of the program
View Answer
Answer: a
Explanation: Only when the execution reaches the place where the automatic variable was declared, the constructor is called. This is to ensure that the memory is not allocated if not needed. The memory is allocated and then destroyed as soon as it goes out of scope.
11. Does java contain auto or register keywords?
a) Yes, for declaring every type of variable
b) Yes, only to declare cache registers
c) No, because java doesn’t support automatic variables
d) No, java supports local variable concept
View Answer
Answer: d
Explanation: The auto and register keywords are not supported in java. Though the same is allowed in java without specifying any of those keywords. The variables are local variables. But java makes it mandatory to initialize all of the local variables in a program.
12. The automatic variables _________________________
a) Must be declared after its use
b) Must be declared before using
c) Must be declared, can be anytime
d) Must not be initialized
View Answer
Answer: b
Explanation: All the automatic variables in a program must be declared before their use. The compiler won’t allow any use of variable if those are not declared before their use.
13. Which error is produced if the automatic variables are used without declaration?
a) Undefined symbol
b) Memory error
c) Type mismatch
d) Statement missing
View Answer
Answer: a
Explanation: If the automatic variables are used without declaration or are used before the declaration then the compiler throws an error. The error that the symbol is undefined. The compiler must know everything before that can be used.
14. In Perl, using which operator are the local variables created?
a) Dot
b) Arrow
c) Scope resolution
d) my
View Answer
Answer: d
Explanation: The language perl supports local variables but the concept is bit different. And if the values are not assigned to the local variables then it contains undef value.
15. How are automatic variables different from the instance variables?
a) Automatic variables are initialized automatically but instances are not
b) Automatic variables are given zero values initially and not instances
c) Instance variables have to be initialized explicitly and automatic implicitly
d) Instance variables are initialized implicitly while automatic are not
View Answer
Answer: d
Explanation: The automatic variables have to be initialized explicitly. But in case of instances, those are initialized automatically during execution of the program. The conventions are mandatory.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “Inbuilt Classes”.
1. What are inbuilt classes?
a) The predefined classes in a language
b) The classes that are defined by the user
c) The classes which are meant to be modified by the user
d) The classes which can’t be used by the user
View Answer
Answer: a
Explanation: The classes that are already provided in a programming language for use are inbuilt classes. These classes provide some functions or objects that can be used by the programmer for easier code.
2. Inbuilt class __________________________
a) Must be included before use
b) Are not necessary to be included for use
c) Are used by the compiler only
d) Can be modified by programmer always
View Answer
Answer: a
Explanation: The inbuilt classes must be included in the program. Whenever some functions are used, they must have a declaration before use. The same is the case with classes.
3. What doesn’t inbuilt classes contain?
a) Function prototype
b) Function declaration
c) Function definitions
d) Objects
View Answer
Answer: c
Explanation: The classes contain the definitions of the special functions that are provided for the programmers use. Those functions can be used to make the programming easy and to reuse the already existing code.
4. Which among the following not an inbuilt class in C++?
a) System
b) Color
c) String
d) Functions
View Answer
Answer: d
Explanation: There is no inbuilt class named function in java. The others are classes already provided in java. All those classes contain some special functions to be used in programming.
5. What is the InputStream class meant for?
a) To handle all input streams
b) To handle all output streams
c) To handle all input and output streams
d) To handle only input from file
View Answer
Answer: a
Explanation: The InputStream is an inbuilt class which is used to handle all the tasks related to input handling. This class extends input from keyboard or file or any other possible input stream.
6. Which statement is true for the Array class?
a) Arrays can have variable length
b) The length array can be changed
c) Each class has an associated Array class
d) Arrays can contain different type of values
View Answer
Answer: c
Explanation: The Array class is associated with all the other classes. This gives us the flexibility to declare an array of any type. The index goes from 0 to n, where n is some fixed size for array.
7. What is the use of Math class?
a) To use the mathematical functions with strings
b) To use the mathematical functions
c) To suppress the use of mathematical functions
d) To complex the calculations
View Answer
Answer: b
Explanation: The Math class is provided with some special functions. These functions can be used to calculate and get result of some special and usual mathematical functions. We don’t have to write the code to calculate the trigonometric function results, instead we can use Math functions.
8. DataInputStream is derived from ______________________
a) StreamingInput
b) StreamedInput
c) StreameInput
d) StreamInput
View Answer
Answer: d
Explanation: The DataInputStream is more specific class for operating on specific type of data inputs. This is used to read data of specific type. The same can be used to read data in a specific format.
9. Which attribute can be used to get the size of an array?
a) Size.Array
b) Array.Size
c) Array_name.length
d) length.Array_name
View Answer
Answer: c
Explanation: The array name is given of which the length have to be calculated. The array length is stored in the attribute length. Hence we access it using dot operator.
10. Number class can’t manipulate ____________________
a) Integer values
b) Float values
c) Byte values
d) Character values
View Answer
Answer: d
Explanation: The Number class is used to work with all the number type of values. The integers, float, double, byte etc. are all number type values. Character is not a number value.
11. Which function should be used to exit from the program that is provided by System class?
a) exit(int);
b) gc();
c) terminate();
d) halt();
View Answer
Answer: a
Explanation: The exit function should be used to terminate the program. The function is passed with an argument. The argument indicated the type of error occurred.
12. Which class contain runFinalization() method?
a) Finalize
b) System
c) Final
d) SystemFinal
View Answer
Answer: b
Explanation: The runFinalization() Function is defined in the System class. The function is used to finalize an object which undergo destruction. The action is required to terminate the object properly.
13. What does load(String)::= function do, in System class?
a) Loads dynamic library for a path name
b) Loads all the dynamic libraries
c) Loads all the Number in string format
d) Loads the processor with calculations
View Answer
Answer: a
Explanation: Only the specified path named dynamic libraries are loaded. All the dynamic libraries can’t be loaded at a time. Hence we use this function for specific libraries.
14. Which is not a System class variable?
a) err
b) out
c) in
d) put
View Answer
Answer: d
Explanation: Put is not a System class variable. The most general and basic variables are err, out and in. The variables can handle most of the tasks performed in a program.
15. Which package contains the utility classes?
a) java.lang
b) java.utility
c) java.util
d) java.io
View Answer
Answer: c
Explanation: The package java.util contains all the utility classes. This package also contains generic data structures, date, time etc. These can be used in any java program, you just have to include java.util package.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
This set of Object Oriented Programming (OOPs) Multiple Choice Questions & Answers (MCQs) focuses on “String Class”.
1. Which is a true statement for object of String class?
a) Object are immutable
b) Object are mutable
c) Object are created only once
d) Object can’t be created
View Answer
Answer: a
Explanation: The object of string class are mostly immutable. This means that the String objects are constant. These can’t be changed once created.
2. How to declare an object of class String?
a) String object_Name = value;
b) String object_name = new;
c) String object_name= new value;
d) String object_name= value new;
View Answer
Answer: a
Explanation: The class name String is given. And then the object name is mentioned. There are two ways to declare and initialize the string. Either by giving direct string value or by using new keyword. But if new operator is used, constructor of String class have to be called. From the given options, the direct string value declaration is correct.
3. What does function length do in String class?
a) Returns length of string including null character
b) Returns length of string excluding null character
c) Returns length of substring
d) Returns size of string in bytes
View Answer
Answer: b
Explanation: The length function returns the length of string. The length is the number of characters in the string but the last null character is not counted. The string length can be used to loop through each character in the string.
4. Which is the function to get the character present at a particular index in the string?
a) char charAt(index);
b) char charIn(StringName);
c) char charAt(StringName);
d) char charIn(index);
View Answer
Answer: a
Explanation: The function can be called using dot operator with the string object. Char is the return type of the function to return the character at specified position. The index must be an integer value, less than the length of string.
5. If only one parameter is passed to substring function then __________________
a) It returns the character at the specified position
b) It returns the string of length 1 from the specified index
c) It returns the string from specified index till the end
d) It returns the string from starting of string till the specified index
View Answer
Answer: c
Explanation: The substring function returns a string value. The string is the substring starting from the specified index till the end. The substring function have to be called with the object of string class.
6. If two index are given as argument to substring function then ___________________
a) String of length equal to sum of two arguments is returned
b) String starting from first index and of length equal to send argument
c) String starting from first index and of length equal to sum of two arguments
d) String starting from first index and ending at second index position
View Answer
Answer: d
Explanation: A value of string type is returned from this function. The returned string is a substring that starts from the first argument position, till the second index position. The indices must be less than the length of actual string.
7. String class have a concat() function that is used to _____________________
a) Replace old string by new string
b) Add two strings
c) Append one string at end of another string
d) Remove a string from end of one string
View Answer
Answer: c
Explanation: The concat function is used to append string into another string. The new string is always appended at the end of source string. The target string is appended as it is and the whole string is then ended by null character.
8. The function lastIndexOf() is used to ___________________
a) Get the index of last occurrence of specified character in argument
b) Get the index of first occurrence of specified character in argument
c) Get the index of last occurrence of first character in string
d) Get the index of last occurrence of last character of string
View Answer
Answer: a
Explanation: The function is used to get the last occurrence index of a character present in a string. The return type is char. Single character is returned. The function is used with a string object and the target character is passed as its argument.
9. Function equals() is _______________ and equalIgnoreCase() is _________________
a) Case Insensitive, case insensitive
b) Case sensitive, Case insensitive
c) Case sensitive, case sensitive
d) Case insensitive, case sensitive
View Answer
Answer: b
Explanation: Both the functions return Boolean value. The function equal() is case sensitive and returns false even if a single character is case different in two strings. The other function ignores the case sensitivity and only checks if the spellings are same.
10. The compareTo() function is used to ________________
a) Compare strings value to string object
b) Compare string value to string value
c) Compare string object to another string object
d) Compare string object to another string value
View Answer
Answer: c
Explanation: The source and target must be objects of the string class. The compare is always case sensitive. To compare two string objects without case sensitivity then we can use compareToIgnoreCase() function.
11. String class provides function toUpper() to _____________________
a) Convert first character to uppercase
b) Convert last character to uppercase
c) Convert the whole string characters to uppercase
d) Convert uppercase to lower and lower to uppercases
View Answer
Answer: c
Explanation: The function is used to convert each character of the string. If the character is already uppercase then it remains the same. But if some character is in lowercase then it will be converted to uppercase.
12. String trim() function is used to _______________________
a) Remove all the white spaces from the string
b) Remove white space from start of string
c) Remove white space at end of string
d) Remove white space from both the ends of string
View Answer
Answer: d
Explanation: The function is used to remove any white space from both the ends of a given string. The white space include space, tab, next line etc. It will be removed both from the starting of string and from the end of string.
13. Function replace() accepts _____________ arguments.
a) 1
b) 2
c) 3
d) 4
View Answer
Answer: b
Explanation: The first argument is the target character. This target character will be replaced by another character. The new character is the second argument to the function. Only the characters can be passed as argument, not a string.
14. If two arguments are passed to the indexOf() function then ___________________
a) Second argument indicates the occurrence number of specified character from starting
b) Second argument indicates the occurrence number of specified character from end
c) Second argument indicates the index of the character in first argument
d) Second argument indicates the index of the character from the last of the string
View Answer
Answer: a
Explanation: The string may have more than one occurrence of a character. We use this function to get the index at which the specified number of times a specific character has occurred in a string. For example, we can get the index of 5th occurrence of character “j” in a string.
15. The string class deals with string of only character type.
a) True
b) False
View Answer
Answer: a
Explanation: The string class objects can be used for any string consisting of characters. The characters include numbers, alphabets and few special characters. String class is not necessary to be used but provides a huge set of inbuilt functions to make the string operations easier.
Sanfoundry Global Education & Learning Series – Object Oriented Programming (OOPs).
To practice all areas of Object Oriented Programming (OOPs), here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!


{% extends 'blog/base.html' %} {%block title%}List{%endblock title%} {% block header %} {{user|title}}'s Posts Total of {{total}} Posts {% endblock header %} {% block content %}
Total of {{total}} Posts
Posted on {{post.publish}}
Sorry, has no posts.


{% extends "base.html" %} {% block title %}Success{% endblock %} {% block content %} {% if user.disabled %}
{{ user.name }} has been successfully disabled.
{% else %}{{ user.name }} has been successfully re-enabled. They can now log in again.
{% endif %} Return to User Page {% endblock %}


I am making a Paladin/CoT and I need a cool sounding name! I am just drawing a blank. It doesnt have to sound heroic or anything, I just cant stand that basic Generated Names.
Any ideas? Forgotten Realms setting if it makes a difference.
Male or female? What race? Do you care if it's a 'cliche' type name (such as Shieldbreaker, Hammerfist, Darkbane)? _________________ Where I'm playing now: World of Greyhawk.
How about
Pally Waly Fo Faly Bananana Bo Bally Fei Fi Fo Faly Pally!
sry I was going to say a good name... but then I forgot it.
_________________ They were all dead. The final gunshot was an exclamation mark to everything that had led up to this point. I released my finger from the trigger. And then it was all over. The storm seemed to lose its frenzy. The ragged clouds gave way to the stars above.
LOL, the DM might boot you just for that supid name...
Overall characteristics? you haven't posted the build yet, I recall you were making STR/CHA based, so some Divine Brawler, Slasher of Destiny, Your moma's... no, forget that one...
Name as descriptive or name alone or name + descriptive nickname?
Those before are only descriptive... you wouldn't name your son Divine Brawler, because.. it just sounds wrong.
For name alone I always steal something from another game, in example: Thaxll'ssyllia, I can't help you much more than that.
Name and descrption sounds cool IMO, "Saint Thomas", "Farah Goddes of the skies", "Grendel Paingiver", "Azurath the Called One"....
I admit I'm not good at making up names, but I make them up dammit.
Edited By Thaxll'ssyllia on 05/25/06 04:20
Wow, I feel so dumb for not specifieing.  I dont really like the descriptive names like "Diamond Shield" or "Goldsword" or whatever. I want a standard name that people can say, though nothing modern like "John Smith":roll:
Im terrible with this stuff.
A few off the top of my head:
Byron Valour Darus Mournecastle Paldo Weaver Haldor Whyte Jordan Brundle Graydon Noble _________________ Where I'm playing now: World of Greyhawk.
umm lets see
how about
john smith robert thomas billy bob.....
... on a more serious note
Castiah Snaketongue! but thats evil...
or..
Krieger Dwerg! but thats dwarvish...
.... _________________ They were all dead. The final gunshot was an exclamation mark to everything that had led up to this point. I released my finger from the trigger. And then it was all over. The storm seemed to lose its frenzy. The ragged clouds gave way to the stars above.
I have decided I like the first name Methias. w00t! Progress!
But I cant think of a last name
Methias Holyfist! Methias Holyshield... Methias Holyholy.................. or just Methias Friar Methias Methias Grasscobbenmeas (random) ...
I had a halfling named Wizbang once...
...
Methias Lightheart Methias of the Holy Order!
 The final gunshot was an exclamation mark to everything that had led up to this point. I released my finger from the trigger. And then it was all over. The storm seemed to lose its frenzy. The ragged clouds gave way to the stars above.
Me too...
Hence the thread!
Uufdorm Galshein Votgor Nisshak Aivus Icocci Tealas Orrim Valchom Jechoa Arion Celemor Kinswal Lorvim Dansul Xil Kos Vor
You shouldn't make such a big deal about it, what could go wrong with a bad name? get laughs? I say that make people laugh is a good attribute, go with one randomly... and the worse that could happen is that nothing happens.


Encapsulates an operating system's application window.
More...
#include <Window.h>
|
| | ~Window () |
| | Destroy this window. More...
|
| |
| | Window (Engine &engine) |
| | Construct a window. More...
|
| |
| bool | shouldClose () const noexcept |
| | Checks if this window wants to shut down. More...
|
| |
| void | close () noexcept |
| | Close this window. More...
|
| |
| void | swapBuffers () noexcept |
| | Finish processing a new frame. More...
|
| |
| glm::vec2 | getMousePos () const noexcept |
| | Retrieve the XY coordinates of the mouse relative to this window. More...
|
| |
| void | setMousePos (const glm::vec2 &position) noexcept |
| | Set the XY coordinates of the mouse relative to this window. More...
|
| |
| bool | getMouseKey (const int &buttonID) const noexcept |
| | Retrieve the button-press state of a mouse button. More...
|
| |
| bool | getKey (const int &buttonID) const noexcept |
| | Retrieve the button-press state of a keyboard button. More...
|
| |
| void | setMouseMode3D (const bool &use3DMouse) noexcept |
| | Set whether or not the mouse should be clamped to the center of the window for 3D movement. More...
|
| |
| GLFWwindow * | getContext () const noexcept |
| | Retrieve this engine's rendering context. More...
|
| |
Encapsulates an operating system's application window.
◆ ~Window()
◆ Window()
| Window::Window |
( |
Engine & |
engine | ) |
|
|
explicit |
◆ close()
◆ getContext()
| GLFWwindow * Window::getContext |
( |
| ) |
const |
|
noexcept |
Retrieve this engine's rendering context.
- Returns
- this engine's rendering context.
◆ getKey()
| bool Window::getKey |
( |
const int & |
buttonID | ) |
const |
|
noexcept |
Retrieve the button-press state of a keyboard button.
- Parameters
-
| buttonID | the enumerated button of the keyboard. |
- Returns
- true if pressed, false otherwise.
◆ getMouseKey()
| bool Window::getMouseKey |
( |
const int & |
buttonID | ) |
const |
|
noexcept |
Retrieve the button-press state of a mouse button.
- Parameters
-
| buttonID | the enumerated button of the mouse, starting at 0 for left click. |
- Returns
- true if pressed, false otherwise.
◆ getMousePos()
| glm::vec2 Window::getMousePos |
( |
| ) |
const |
|
noexcept |
Retrieve the XY coordinates of the mouse relative to this window.
- Returns
- the coordinates of the mouse.
◆ GetResolutions()
| std::vector< glm::ivec3 > Window::GetResolutions |
( |
| ) |
|
|
static |
Retrieve a list of available resolutions.
- Returns
- vector of supported resolutions.
◆ GetSystemTime()
| float Window::GetSystemTime |
( |
| ) |
|
|
staticnoexcept |
Retrieve the current time.
- Returns
- the current time.
◆ GetVersion()
| std::string Window::GetVersion |
( |
| ) |
|
|
static |
Retrieve the GLFW version.
- Returns
- the version of GLFW in use.
◆ MakeCurrent()
| void Window::MakeCurrent |
( |
GLFWwindow *const |
context | ) |
|
|
staticnoexcept |
Make the supplied context current for OpenGL functions.
- Parameters
-
| context | pointer to the desired context. |
◆ setMouseMode3D()
| void Window::setMouseMode3D |
( |
const bool & |
use3DMouse | ) |
|
|
noexcept |
Set whether or not the mouse should be clamped to the center of the window for 3D movement.
- Parameters
-
| use3DMouse | set to true to clamp the mouse to the center. |
◆ setMousePos()
| void Window::setMousePos |
( |
const glm::vec2 & |
position | ) |
|
|
noexcept |
Set the XY coordinates of the mouse relative to this window.
- Parameters
-
| position | the coordinates of the mouse. |
◆ shouldClose()
| bool Window::shouldClose |
( |
| ) |
const |
|
noexcept |
Checks if this window wants to shut down.
- Returns
- true if the window should close.
◆ swapBuffers()
| void Window::swapBuffers |
( |
| ) |
|
|
noexcept |
Finish processing a new frame.
The documentation for this class was generated from the following files:
- src/Utilities/GL/Window.h
- src/Utilities/GL/Window.cpp


Name:
Package:
ID:
Visit Wavetab's website Visit the support page Leave a review
Coded with by Liz Wigglesworth
Font AwesomeMoment.js
Click the to change your options.
This update brings new customization features and much more! Click here to see the full changelog.


Successfully unsubscribed!
You have successfully unsubscribed.Thanks for using our site.Stay safe and fit!.
Home Page


Clojurescript Ethereum Developer
Web, Mobile & Software Dev
i-Elect Labs is searching for an expert Clojurescript developer to join us in building the future of decentralized, Web 3.0 marketplaces.
The i-Elect project was founded in August 2019 with the goal of launching a network of decentralized marketplaces to eliminate rent-seeking, facilitate community governed economies, and to relinquish 3rd party data collection.
In recent months, five production studios have received contracts to build infrastructure and marketplaces that were outlined in the project roadmap. Most of the project’s branding and design work has been conducted by i-Elect Team. Administrative support and community management has been provided by Hebron Startup Lab, a strategic startup birthing and consulting service.
Consistent with its decentralized nature, i-Elect is continuing to work with a broader range of development teams. To assist in this, in the first half of 2019 we are opening up the bidding process for work to interested outside parties, accepting proposals from teams for tasks of all types, including not only development of future districts and modules, but also administrative, marketing, or community management tasks.
i-Elect aims to facilitate the operation and governing of marketplaces and communities as decentralized entities. i-Elect seeks to enable the recreation of many of the internet’s most popular applications and services while eliminating rent-seeking and the relinquishment of decisions and personal data to third-parties.
We are a globally distributed organization, with contributors located all over the world
Contractors are trusted to know where their time is best spent and to act accordingly
i-Elect has a zero-tolerance policy for discrimination of any kind, we welcome all contributors
i-Elect Labs is searching for an expert Clojurescript developer to join us in building the future of decentralized, Web 3.0 marketplaces.


Pat is a native of the Pacific Northwest who grew up in and around Seattle, appreciating the natural beauty and easy access to salmon and coffee. After having kids, Pat struggled to find a way for the whole family to enjoy the health benefits of salmon. With two young picky eaters, Pat attempted to hide salmon in various culinary concoctions, but to no avail.
One day in frustration, Pat tried pulverizing the salmon and baking it into cookies, and the ancestor of Pat's Salmon Cookies was born. These cookies were both delicious and nutritious - and best of all, the kids didn't even notice the salmon! Once the secret was out, the whole family kept eating the delicious cookies, and Pat started experimenting with different flavors.


{% extends "base.html" %} {% block content %}
Thanks for registering. Please check your inbox for an activation e-mail.


| DOSE: |
repeated |
insufflated |
Cocaine |
(powder / crystals) |
I've been a regular cocaine user for about a month. Although it hasn't been a long term habit, there have already been instances that I've considered myself addicted. Here is why:
My first use was not administered to a sober mind. I was drunk, high on marijuana, as well as the typical dose of paroxetine (20mg) that I take daily. In this first usage, I didn't feel very much. I played pool, and I was incapable of performing. Balls would fly all over the place, I'd lost my motor skills. I was in a good mood until the game ended and my coked/drunk/stoned pals put on a skateboarding video. I grew bored and decided to go home. Upon returning home, I finished my cocaine and began to feel very guilty and remorseful. I was simultaneously physiologically without any sense of pain. I was elated and my every movement felt warm and sensual. Perhaps this was the alcohol combined with the cocaine.
My next experiences cost me much more money. The first line from my second purchase caused me to again feel guilty, and strangely, afraid. I continued to snort throughout the night, and talked to my friend Carla, who wondered why I would abuse myself in that way. I definitely felt energy, but psychologically I was miserable. The effects of cocaine are mostly physiological, I then deduced. It was totally possible for me to soberly think disturbing, negative thoughts while being high on large amounts of the drug, up to half a gram.
I went on a cocaine binge once I realized it could enhance my intelligence. I wrote essays for university while snorting lines, and my creativity and eloquence seemed beyond my normal state of mind. I would paint, exercise, go for walks, talk to family members (who were unaware). I would even snort lines at work, in the washroom. There seemed to be no downside to the drug.
I continued to abuse cocaine as the weeks progressed until I had an unfortunate incident occur at a movie theater. I went to see the remake of 'the texas chainsaw massacre' while very stoned on marijuana as well as cocaine. From the outset, I began to feel very frightened, and my heart raced to such an extreme that I feared cardiac failure. I arose and told my friend that I had to use the washroom. On the way, I collapsed in the hallway. The theater staff confronted me but all I could visibly see was blackness and thousands of vibrating faces. The staff called a paramedic and I regained consciousness just as they were arriving. I explained my psychological/chemical state and they offered to take me to the hospital. I refused and asked instead to be driven home. Upon arriving home, I snorted more cocaine.
As my usage has increased, I have lost the sensation of guilt and fear while using, unless if a friend inquires of my financial situation or usage amount. My nose is always encrusted in blood, I often have insomnia where I lie awake thinking of the various things I could employ cocaine to my advantage, and I sometimes become paranoid.
One evening, I much exceeded my amount at a party, and decided that I should return home. Home alone, I heart voices, and had to back into a corner to feel confident that no one was behind me. It was not an intense fear, only a self-indulgent game where I consciously knew that I was hallucinating, yet decided to trust my perception.
I have learned first hand the life-enhancing aspects of short term cocaine use, as well as some of the threats of sustained, long-term usage.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


[gecode-users] (no subject)
Christian Schulte
cschulte at kth.se
Tue Feb 17 11:10:29 CET 2015
Hi Tuomas,
Sorry for the delay, I was afk.
There is not much needed to get started with Constraint Programming, a CS degree is by far enough (I have educated quite a number of people in CP with less background knowledge than that). You can either follow the first two chapters in “Modeling and Programming with Gecode” or you could consider starting CP with a modeling language such as MiniZinc:
http://www.minizinc.org/
If you want to know about the foundations of Gecode you can check:
http://www.csse.monash.edu/~guidot/dissertation.php
and
http://www.gecode.org/~schulte/paper.html?id=SchulteStuckey:TOPLAS:2008
and also other papers here:
http://www.gecode.org/publications.html
Cheers
Christian
--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, <mailto:cschulte at kth.se> cschulte at kth.se
Expert Researcher, SICS, <mailto:cschulte at sics.se> cschulte at sics.se
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Gustavo Gutierrez
Sent: Friday, February 13, 2015 3:24 PM
To: Tuomas Pellonperä
Cc: gecode list
Subject: Re: [gecode-users] (no subject)
Hi Tuomas,
I would say that in practice what you need is in the gecode documentation or reachable from there. However, if you are interested in the mathematical foundations of constraint programming (not only gecode) you can start by the book of Apt titled Principles of Constraint Programming (http://homepages.cwi.nl/~apt/books.html). Another one is the Handbook of Constraint Programming which is a very good reference.
As you are asking for theoretical foundations I suggest you to have a look at those books which are not gecode specific. However their contents will get you in the right direction. If you are looking for seminal works I would suggest you to look at http://scholar.google.com/citations?user=yT1DBNsAAAAJ <http://scholar.google.com/citations?user=yT1DBNsAAAAJ&hl=en&oi=sra> &hl=en&oi=sra
Again, none of them are directly related to gecode but describe its formal foundations.
Cheers,
Gustavo
On Fri, Feb 13, 2015 at 2:40 AM, Tuomas Pellonperä <tuomas.pellonpera at gmail.com> wrote:
Hello!
What kind of a theoretical foundation -- mathematics, and computer
science -- is required for developing and using Gecode productively?
(My background: I graduated last summer; I majored in computer science
(algorithms), and the subject of my master's thesis was Ant colony
optimization and vehicle routing problem. Even though I didn't cover
it in my thesis, I came accross constraint programming and soon after
that Gecode came on my radar. I feel there are gaps in my mathematical
basis; hence the question.)
Thank you for your time.
Regards,
Tuomas Pellonpera
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
--
---
Gustavo Gutierrez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20150217/863cf22d/attachment.html>
More information about the users
mailing list


--- layout: page title: "About" description: "Hello! We are MLLOG" header-img: "img/home_bg.jpg" ---
We are Machine Learning enthusiasts who have deeply interested in researching and applying Machine Learning. We will share what we learn about Machine Learning in this blog.


PureBasic - AudioCD
Overview
Audio CDs are an excellent way to play very high quality music during a game or an application, without consuming a lot of system resources. This library provides all the functions necessary to manage audio CD playback within PureBasic programs.
Command Index
AudioCDLength
AudioCDName
AudioCDStatus
AudioCDTrackLength
AudioCDTrackSeconds
AudioCDTracks
EjectAudioCD
InitAudioCD
PauseAudioCD
PlayAudioCD
ResumeAudioCD
StopAudioCD
UseAudioCD
Example
AudioCD.pb
Supported OS
All


`
30
Your browser does not support the video tag.
Please Rate Our App
It takes only a moment and helps alot
No Thanks
Rate Now
Later
FAILED
Level Goal
25
Your Score
0
Try Again
Skip Level
Start Over


Test: ' + 'MOJARRA-4340-workaround
Status: ' + 'SUCCESS
Detail: ' + 'Resource URLs loaded via Ajax were not double escaped.


Your Directory:
Your feedback message has been sent, we will look it over and see whether your opinion is worth our time.


A joyfull celebration believing in the value of openness and sharing a positive change with people from over 80 countries is taking place in october , in Kenya. Financial Analysis using Excel Course is designed for existing users of Excel or similar spreadsheet programs needing to vastly increase their modelling & analytical skills especially in the disciplinary. International Conference on Management and Information Technology aims to bring together leading academic scientists, researchers and research scholars to exchange and share their experiences and research...
Create Commons Global Summit 2021 Logo
The logo of MALOBI Global 2021 was decided thought International Conference on Management and Information Technology aims to bring together leading academic scientists, researchers and research scholars to exchange and share their experiences and research .
MALOBI tech
14h-17h oct 2021 nairobi
See the past MALOBI Tech Summits
Take a look at last two Summits which took place in Mombassa and Nairobi
2021
Malobi Global summit
2019
Malobi Global summit


Welcome to (or possibly, back to) our website, which has one of the silliest names on earth. At least it looks nice, and has a good ol' fashioned mouseover (redirect, header title), so we're good for now. Anyway, we're wondering - is this bar of 'endless detail' even necessary? According to our brains, no. But it still exists, and we probably won't remove it. Here's who 'we' are;
-----
Me (ComicSketchAnonymous),
Crisco,
Suma-White-Lion,
PixelThousand,
And finally, my (very helpful) parents, who are editors - LovelyLemon and Actdorky
-----
They're the
admins - clever people who help power this website. They're off for lunch now ¯\_(ツ)_/¯.


I'm Afiya Juyairia.
I am a Bengali-Canadian User Experience Designer based in Toronto. I currently am a second year student majoring in User Experience Design (BDes) at Wilfrid Laurier University.
I chose to pursue design to reduce barriers for the individuals who need it most. I strive to dedicate my work to accessible and inclusive design in the pursuit of levelling the playing field for all people, not just the privileged and able-bodied.


At Enhance, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by Enhance and how we use it.
If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.
This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in Enhance. This policy is not applicable to any information collected offline or via channels other than this website.
By using our website, you hereby consent to our Privacy Policy and agree to its terms.
The personal information that you are asked to provide, and the reasons why you are asked to provide it, will be made clear to you at the point we ask you to provide your personal information.
If you contact us directly, we may receive additional information about you such as your name, email address, phone number, the contents of the message and/or attachments you may send us, and any other information you may choose to provide.
When you register for an Account, we may ask for your contact information, including items such as name, company name, address, email address, and telephone number.
We use the information we collect in various ways, including to:
Enhance follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.
You may consult this list to find the Privacy Policy for each of the advertising partners of Enhance.
Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on Enhance, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.
Note that Enhance has no access to or control over these cookies that are used by third-party advertisers.
Enhance's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options.
You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites.
Under the CCPA, among other rights, California consumers have the right to:
Request that a business that collects a consumer's personal data disclose the categories and specific pieces of personal data that a business has collected about consumers.
Request that a business delete any personal data about the consumer that a business has collected.
Request that a business that sells a consumer's personal data, not sell the consumer's personal data.
If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.
We would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following:
The right to access – You have the right to request copies of your personal data. We may charge you a small fee for this service.
The right to rectification – You have the right to request that we correct any information you believe is inaccurate. You also have the right to request that we complete the information you believe is incomplete.
The right to erasure – You have the right to request that we erase your personal data, under certain conditions.
The right to restrict processing – You have the right to request that we restrict the processing of your personal data, under certain conditions.
The right to object to processing – You have the right to object to our processing of your personal data, under certain conditions.
The right to data portability – You have the right to request that we transfer the data that we have collected to another organization, or directly to you, under certain conditions.
If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.
Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.
Enhance does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.


If someone’s life is in danger, call 911
If the person is conscious, ask him or her:
- His or her name
- Details about the incident
- Details about his or her wounds
- Questions about his or her allergies and health problems
- Contact Security at extension 55 (internal telephone system).
- Do not hang up until the dispatcher tells you to do so.
- If you have first aid training, give first aid.
- Ask those who are present to find a first aid worker on the floor.
- Stay on site to assist first aid workers and give them information about the victim.
- Ask people on site to help you as you wait for help.
- Keep people away from the victim to keep the area clear and make first aid workers’
job easier.
- Don’t move the victim unless the situation presents a danger to him or her.
- Don’t give the victim anything to eat or drink, even if he or she asks for it.
- If possible, stay in contact with Security.
- If the victim’s state deteriorates, inform Security.


%inherit file = "app_base.html"/> <%block name="content_center">
Your purchase is on its way. Please check your email, ${your_email}, for a receipt!


LEO CDP is the Customer Data Platform for on-premises deployments, is developed by USPA Technology Company.
There are 5 main functions of LEO CDP
- Provide a customer analytics solution for data-driven organizations
- Unification to Single-view Profile: Consistent & Unified 360 degree Customer View
- Segmentation with Visual Data Query Technology
- Personalization by Open Source Recommender System
- Activation with open Data Enrichment Services and Data Connectors


Reads in either a Pro/Engineer RENDER format file (.SLP) or a Stereo-Lithography (.STL) file and creates field data from it and directly renderable Data objects from the data.
Parameters
The following lists all of the parameters found in the parameter block ReadSLPSTLParams, which are accessed by the module ReadSLPSTLFile and the UI Macro ReadSLPSTLUI.
Name Type Description UI Control filename string input SLP/STL filename Read SLP/STL File Name err int error message trigger Error label err_str string error message to display Error label Output Ports
Name Type Description out Field field data representing the SLP/STL model. obj DataObjectNoTexture directly renderable output object.
The readSLPSTL macro reads in two kinds of files, Pro/Engineer RENDER format files (.SLP) and Stereo-Lithography (.STL) files. Data from these files is parsed by the macro and output in two forms, Field data and directly renderable DataObject. It is assumed that the RENDER format has only two data components - NORMAL and COLOR. These are both read and put into the node_data, since the data is based on the triangle vertices. It is also assumed that there is only one solid in the RENDER file.
The module is capable of reading in both ASCII and binary forms of the STL file format, and converting the patches present into AVS/Express triangle lists. When reading in binary data the module also detects bigendian/littlendian conversion switching. It also sets two parameters within the parameter block it references. These are used to display error messages to the user through the UI. The SLP/STL file to be read can also be chosen through the user interface.
filename
A member of the ReadSLPSTLParams parameter block group, this string value is used to specify the name of the SLP or the STL file that should be loaded.
err
A member of the ReadSLPSTLParams parameter block group, this int value is used to trigger the display of error messages in the UI. When this parameter is set to 1 the error label present in the UI becomes visible. This parameter is set by the function and is not used for input.
err_str
A member of the ReadSLPSTLParams parameter block group, this string value is used to output the current error message so that it can be displayed. This parameter is set by the function and is not used for input.
out
The most primitive output field of the readSLPSTL macro. This contains the model read from the SLP/STL file represented as field data.
obj
The directly renderable output field of the readSLPSTL macro. This contains a DataObjectNoTexture object that can be rendered by the standard data viewers. The Data Object is generated directly from the field data created from the SLP/STL file.
The low-level ReadSLPSTLFile module is used in this User Macro readSLPSTL.
An example application ReadSLPSTLEg is provided, which loads either a SLP or a STL file, generates a set of field data from it and then displays it using the standard 3d viewer.
xp_comm_proj/rd_slpst/rdslmacs.v contains the readSLPSTL User Macro, the ReadSLPSTLUI UI Macro, and the example application ReadSLPSTLEg V definitions.
The ReadSLPSTLMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level ReadSLPSTLFile module, executes under the process specified in its library, not the process defined in the high-level library.
Jeremy Maccelari Ian Curington
Andrew Dodd Paul G. Lever Tobias Schiebeck
ReadSLPSTLParams, ReadSLPSTLUI and ReadSLPSTLFile.