intarray[]={10,20,30}; cout<<-2[array]; return0; } a) -15 b) -30 c) compile time error d) garbage value View Answer Sanfoundry Global Education & Learning Series – C++ Programming Language. To practice all areas of C++ language,here is complete set of 1000+ Multiple Choice Questions and Answers. Subscribe: C++Newsletter Sub...
Sanfoundry Global Education & Learning Series – C Programming Language.To practice all areas of C language, here is complete set of 1000+ Multiple Choice Questions and Answers.« Prev - C Programming MCQ – Array » Next - C Programming Questions and Answers – Address Arithmetic – 1...
Java Programming Tests Certification Test Internship Test Job Test Top Rankers Core Java Basic Quiz Java Array Quiz Java Operators Quiz Java OOPs Quiz Java Methods Quiz Java Constructor Quiz Java Inheritance Quiz Java String Handling Quiz Java I/O Quiz Java Serialization Quiz Java Networking Quiz Jav...
1. Create an array of fixed size (maximum capacity), lets say 10. 2. Take n, a variable which stores the number of elements of the array, less than maximum capacity of array. 3. Iterate via for loop to take array elements as input, and print them. 4. The array elements are in ...
charx[ARRAY_SIZE(SIZE)]={0}; inti; for(i=0;i<SIZE;i+=2) toggle_bit(x,i); toggle_bit(x,56); for(i=0;i<SIZE;i++) printf("%d: %d\n",i,get_bit(x,i)); return0; } Output: $ gcc BitArray.c $ ./a.out 0: 1 1: 0 2: 1 3: 0 4: 1 5: 0 6: 1 7: 0 8...
* C Program to Input a String & Store their Ascii Values in an Integer Array & Print the Array */ #include <stdio.h> voidmain() { charstring[20]; intn,count=0; printf("Enter the no of characters present in an array\n"); ...
Method 1: Bubble Sort Program in C (Iterative Approach) In the iterative approach to sort the array, we have to follow the given steps: Take an element from the beginning of the array. Compare it with its next element from the start to the end of the unsorted array. ...
Here is the source code of the C++ program which takes the values of array as input and returns the elements as they are structured in the maximum heap model. This C++ program is successfully compiled and run on DevCpp, a C++ compiler. The program output is also shown below. /...
Is sizeof Operator in C Evaluate the Expression for Determining its Size Size of an Array using sizeof Operator OR strlen() Function in C Operator Precedence and Associativity in C Object Oriented Programming using C++ Questions and Answers – Member Operator… Difference between strlen() an...
Watch Advanced C Programming Videos Practice BCA MCQs Check C Books Check Computer Science Books Apply for C InternshipRecommended Articles: Java Program to Get IP Address C# Program to Get IP Address Java Program to Find the Address of an Array IOT Questions and Answers – MAC Address Co...