अभी पंजीकरण करें

लॉग इन करें

पासवर्ड खो गया

आपका पासवर्ड खो गया है? कृपया अपना पूरा ईमेल दर्ज करें. आपको एक लिंक प्राप्त होगा और आप ईमेल के माध्यम से एक नया पासवर्ड बनाएंगे.

पोस्ट जोड़ें

पोस्ट जोड़ने के लिए आपको लॉगिन करना होगा .

प्रश्न जोड़ें

प्रश्न पूछने के लिए आपको लॉगिन करना होगा.

लॉग इन करें

अभी पंजीकरण करें

स्कॉलरसार्क.कॉम में आपका स्वागत है! आपका पंजीकरण आपको इस प्लेटफॉर्म की अधिक सुविधाओं का उपयोग करने की अनुमति देगा. आप सवाल पूछ सकते हैं, योगदान दें या उत्तर दें, अन्य उपयोगकर्ताओं के प्रोफ़ाइल देखें और बहुत कुछ. अभी पंजीकरण करें!

लिंक्डइन कौशल मूल्यांकन उत्तर और प्रश्न - उद्देश्य-सी

Objective-C is a powerful object-oriented programming language that forms the foundation of iOS app development. इस व्यापक मार्गदर्शिका में, we’re excited to present a series of skill assessment questions तथा जवाब के लिए विशेष रूप से तैयार किया गया Objective-C.

Whether you’re a seasoned developer looking to expand your capabilities or a beginner aiming to understand the basics of this powerful language, यह संसाधन आपको इसमें निपुण बनने में मदद करने के लिए डिज़ाइन किया गया है Objective-C और इसके अनुप्रयोग. Join us as we explore the fundamentals of Objective-C, memory management, delegation patterns, and other critical aspects of working with this cutting-edge language.

Q1. What is the value of s?

NSMutableString *s = [NSMutableString stringWithString: @"123"];
[s appendString: @"456"];
  • 123456
  • 123
  • 123
  • 456
  • This code contains an error.

Q2. What’s the value of i after these statements?

NSString *str = nil;
NSInteger i = str.integerValue;
  • nil
  • 0 (technically nil == 0 but i will have a literal value of 0 and not the void* value of nil)
  • -1
  • This code crashes.

Q3. What value is in str after this line in executed?

NSString str = "test" + " " + "more";

  • This code contains an error
  • परीक्षण
  • nil
  • test more

Q4. What is the output of the code given below?

    NSPredicate *p2 = [NSPredicate predicateWithBlock:^BOOL(NSString*  evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
      return evaluatedObject.intValue % 2 == 0;
    }];
    NSArray *vals = @[@"1", @"2", @"3"];
    NSArray *n2 = [vals filteredArrayUsingPredicate:p2];
    NSLog(@"%@", n2.firstObject);
  • 2
  • 1,2,3
  • 1,2
  • कुछ नहीं, since this code contains an error.

Q5. Property defaults include _?

  • atomic/strong
  • atomic/weak
  • nonatomic/weak
  • nonatomic/strong

Q6. What is the key difference between NSDictionary and NSMutableDictionary?

  • NSMutableDictionary’s values can change
  • NSMutableDictionary has not initializers.
  • NSDictionary can’t be copied.
  • NSDictionary’s values can change.

क्यू 7. What is foo?

-(float)foo;

  • A function with a return type of float.
  • This code contains an error.
  • A variable declaration of type float.
  • A property of type float.

क्यू 8. What can you glean from this line?

#import "NSString+NameHelper.h"

  • NameHelper is a category of NSString.
  • NameHelper is a subclass of NSString.
  • NSString implements the NameHelper protocol.
  • NSString has a helper class.

प्रश्न 9. What’s wrong with this code?

float x = 5.;

  • Nothing is wrong with this code.
  • Declarations do not need semicolons.
  • x=5 is an invalid float.
  • Variables can’t be declared and initialized in the same state.

प्र10. How many times with this loop be executed?

for (int x=0; x<100; x++) {
  x = x + 1;
}
  • 50
  • 99
  • 100
  • This code contains an error.

प्रश्न 11. What is this code an example of?

[self addObserver: self forKeyPath: @"val" options:0 context: nil];

  • Key-Value Observing
  • Class Value Observing
  • Key-Data Observing
  • KeyPath Observing

प्र12. What does ARC stand for?

  • Automatic Reference Counting
  • Automatic Retain Checking
  • Async Retain Cycles
  • Automatic Release Code

प्रश्न 13. What is printed for this code?

int val = 0;
val = 1.5;
printf("%d", val);
  • 1
  • 2
  • 0
  • This code contains an error.

प्र14. What best describes class inheritance in Objective-C?

  • single inheritance but multiple protocol implementation
  • Objective-C doesn’t support inheritance
  • dual class inheritance
  • unlimited class inheritance and protocol adherence

प्रश्न 15. How many keys does this NSDictionary have after this code is executed?

NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys: @"b", @"e", @"a", @"r", nil];

  • 2
  • 4
  • 5
  • This code contains an error.

प्र16. What is the error in this code?

NSMutableDictionary *dict1 = [NSMutableDictionary dictionaryWithCapacity:5];
[dict1 setValue:@"key" forKey:@"value"];
  • The key and value items are mixed
  • Nothing is wrong with it
  • You can’t set the capacity of a dictionary
  • NSMutableDictionary doesn’t have a :setValue:forKey function.

प्रश्न 17. What is printed from this code?

NSData *data = [@"print" dataUsingEncoding:NSASCIIStringEncoding];
NSLog(@"%@", [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]);
  • print
  • This code is invalid
  • Nothing is printed from this code.
  • nil

प्रश्न 18. What is different about this function?

+(void)doSomething;

  • It is static
  • It is abstract.
  • It is inline.
  • This code contains an error.

क्यू19. Structs can have _?

  • कार्यों
  • initializers
  • परीक्षण प्रबंधन के लिए
  • ये सभी उत्तर

प्र20. What is wrong with this code?

@interface MyClass : NSObject
    @property (strong, nonatomic, readonly) NSString *name;
  @end
  • There is nothing wrong with this code.
  • There is not read-only directive.
  • MyClass doesn’t implement NSObject.
  • Properties are declared in the implementation.

प्र21. What is an enums base type for the code below?

typedef enum { Foo1, Foo2} Foo;

  • There is no base type.
  • NSObject
  • int यहाँ
  • NSNumber

प्र22. If you want to store a small amount of information (जैसे, user settings), whats the best, built-in way to go?

  • UserDefaults
  • plist file
  • CoreData
  • TextFile

प्र23. What are categories used for?

  • to extend other classes
  • to manage access control
  • to coordinate objects
  • to group classes

प्र24. What is this Objective-C code checking?

if ([keyPath isInstanceOf:[NSString class]]) {
}
  • This code contains an error
  • if keyPath is an instance of NSString
  • if keyPath’s baseclass is the same as NSString’s baseclass
  • if keyPath implements the same methods as NSString

प्रश्न25. What is this a declaration of?

int(^foo)(int);

  • an Extension
  • a Generic
  • a block of code
  • an abstract class

प्र26. For observing changes to a property, which of these two statements cause the related method to be called and why?

1. _val = 1;
2. self.val= 100;
  • कथन 2, since it calls the auto-created setter on the property.
  • कथन 1, since it uses the property directly.
  • कथन 2, since it specifies the class instance to use.
  • कथन 1, since it calls the auto-created setter on the property.

प्र27. What is wrong with this code?

float x = 2.0;
int(^foo)(int) = ^(int n1) {
  return (int)(n1*x);
};
foo(5);
  • Ints and floats can’t be multiplied.
  • The parameter isn’t declared correctly.
  • x is not in the right scope.
  • Nothing is wrong with this code.

प्रश्न 28. What’s the difference between an array and a set?

  • Arrays are ordered, non-unique values.
  • Arrays are stored sorted.
  • Sets are ordered, unique values.
  • Sets can contain nils.

प्र29. Dot notation can be used for _?

  • कुछ नहीं, as they’re never used in Objective-C
  • function calls only
  • property getter/setter
  • parameter delimiters

क्यू30. What is the value of newVals after this code is executed?

NSArray *vals = @[@"1", @"2", @"3"];
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF.intValue > 1"];
NSArray *newVals = [vals filteredArrayUsingPredicate:pred];
  • 2,3
  • nil
  • This code contains an error
  • 2,”3″

प्रश्न31. How would this function be called?

-(int)foo:(int)a b:(int)c;

  • self.foo(5, बी:10);
  • This code contains an error.
  • [self foo:5:10:20];
  • [self foo:5 बी:10];

प्र32. What is the type of the error return value stored in json?

NSError *error;
NSData *data;
id json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
  • NSString
  • NSArray
  • पहचान
  • NSDictionary

प्रश्न 33. What is significant about this function declaration?

-(void)testFunc:(NSString**)str;
  • The parameter is passed by value and can not be changed
  • ** is not allowed on a parameter
  • The parameter may be nil
  • The parameter is passed by reference and may be changed

प्रश्न34. What is printed from this code execution?

typedef enum {
    thing1,
    thing2,
    thing3
} Thing;


-(void) enumStuff {
    NSLog(@"%d", thing2);
}
  • 0
  • 1
  • thing2
  • This code does not print anything

क्यू35. You are worried about threaded access to a property and possible collision in writing. What directive should you use on the property?

  • non-atomic
  • बलवान
  • weak
  • atomic

प्र36. What is wrong with this line of code?

int temp = 1==1;
  • temp is a keyword.
  • 1==1 is invalid.
  • 1==1 evaluates to a Boolean.
  • Nothing is wrong with it.

प्रश्न37. What is special about the code within this block?

dispatch_async(dispatch_get_main_queue(), ^{
// code
});
  • It executes on the main queue.
  • It is the last code to run before the app goes inactive.
  • It executes on a background thread.
  • It is queued to execute in the background.

प्रश्न 38. How many items are in set1 after this code executes?

NSMutableSet *set1 = [NSMutableSet setWithObjects: @1,@2, @3, @4, @5, nil];
[set1 add0bject:@3];
  • zero
  • छह
  • एक
  • five

प्र39. What is wrong with this code?

NSDictionary *d1 = @[@"v1", @4, @"v2", @5.6, @"v3"];
NSlog(@"d1: %@", d1);
  • NSDictionary cannot be printed this way.
  • The last key is missing a value.
  • Dictionaries cannot have mixed types as values.
  • d1 is assigned an NSArray of values.

क्यू40. What is the initial value of the property val?

@property (nonatomic, readonly) int val;
  • 8
  • nil
  • -1
  • undefined

प्र41. Which thread should UI updates be processed on to avoid crashes and application lag?

  • सादे मास्क के उपयोग से COVID-19 के संचरण को कम किया जा सकता है
  • dispatch
  • पृष्ठभूमि
  • main

प्र42. What is the value of val after this code is executed?

NSString *val = @"1.23";
BOOL tf = val.boolValue;
  • This code is invalid
  • हाँ
  • नहीं
  • 1

प्रश्न 43. In this code, what does ThatOne refer to?

@interface TestClass : ThisOne <ThatOne>
  • the parent class of TestClass
  • the name of the category being created for ThisOne
  • a protocoL impLemented by ThisOne
  • a helper file’s name

प्रश्न 44. What is the value of result after this code is executed?

NSString *result = [Ftest"
    stringByTrimmingCharactersInSet.NSCharacterSet.alphanumericCharacterSet];
  • “”
  • “तों”
  • “परीक्षण”
  • none of these answers

क्यू45. When will self receive the notification based on this code?

MyClass .classObj = [[MyClass allot] init];
[class0bj add0bserver:self forKeyPath:@"name"
              options:NSKeyValueObservingOptionNew context:NULL];
  • none of these answers
  • class0bj will recieve the notification, not self.
  • when class0bj is set to “नाम”
  • when the name property in the class0bj instance changes

प्र46. What is wrong with this code?

[*"true" boolValue];
  • String literal are not created with*.
  • NSString doesn’t have a boolValue function.
  • “सच” has no meaning.
  • There is nothing wrong with this code.

प्रश्न 47. How many times does this loop execute?

int loopVal = 0;
for (int i=0; i>loopVal; i--){
    i--;
}
  • an infinite number of times
  • This code is invalid.
  • zero
  • एक

प्रश्न 48. What will this code print?

NSLog(@"%lu", @"test".length);
  • “परीक्षण”
  • कुछ नहीं, this code is invalid.
  • 4
  • 0

प्र49. What is the value of numVtoInt after this code is executed?

NSNumber *numV = [NSNumber numberWithFloat:6.7];
int numVtoInt = numV.intValue;
  • 6
  • 0
  • 6.7
  • 7

क्यू50. What does this code print?

NSString *val = @"1.23";
NSLog(@"%.04f", val.floatValue);
  • 1.2300
  • .04
  • This code is invalid
  • 1

प्रश्न51. What is the maximum possible value of r1 in this code?

int r1 = arc4random() % 10;
  • 0
  • 9
  • 1
  • 10

लेखक

  • हेलेन बस्सी

    नमस्ते, I'm Helena, एक ब्लॉग लेखक जिसे शिक्षा क्षेत्र में ज्ञानवर्धक सामग्री पोस्ट करने का शौक है. मेरा मानना ​​है कि शिक्षा व्यक्तिगत और सामाजिक विकास की कुंजी है, और मैं अपने ज्ञान और अनुभव को सभी उम्र और पृष्ठभूमि के शिक्षार्थियों के साथ साझा करना चाहता हूं. मेरे ब्लॉग पर, आपको सीखने की रणनीतियों जैसे विषयों पर लेख मिलेंगे, ऑनलाइन शिक्षा, व्यवसायिक नीति, और अधिक. मैं अपने पाठकों की प्रतिक्रिया और सुझावों का भी स्वागत करता हूं, इसलिए बेझिझक एक टिप्पणी छोड़ें या किसी भी समय मुझसे संपर्क करें. मुझे आशा है कि आपको मेरा ब्लॉग पढ़ने में आनंद आएगा और यह उपयोगी और प्रेरणादायक लगेगा.

    सभी पोस्ट देखें

के बारे में हेलेन बस्सी

नमस्ते, I'm Helena, एक ब्लॉग लेखक जिसे शिक्षा क्षेत्र में ज्ञानवर्धक सामग्री पोस्ट करने का शौक है. मेरा मानना ​​है कि शिक्षा व्यक्तिगत और सामाजिक विकास की कुंजी है, और मैं अपने ज्ञान और अनुभव को सभी उम्र और पृष्ठभूमि के शिक्षार्थियों के साथ साझा करना चाहता हूं. मेरे ब्लॉग पर, आपको सीखने की रणनीतियों जैसे विषयों पर लेख मिलेंगे, ऑनलाइन शिक्षा, व्यवसायिक नीति, और अधिक. मैं अपने पाठकों की प्रतिक्रिया और सुझावों का भी स्वागत करता हूं, इसलिए बेझिझक एक टिप्पणी छोड़ें या किसी भी समय मुझसे संपर्क करें. मुझे आशा है कि आपको मेरा ब्लॉग पढ़ने में आनंद आएगा और यह उपयोगी और प्रेरणादायक लगेगा.

उत्तर छोड़ दें