Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Various ways of initializing the Arrays.
- The for loop initializes 10 elements with the value of their index.
void main()
{
const int size = 10;
int arr[size];
for(int i = 0; i < size ; i++ ) // You can declare a
variable here in C++.
arr[i] = i;
}
e.g.
int arr[3] = {0,1,2};
- An explicitly initialized array need not specify size but if specified the number of elements provided must not exceed the size. If the size is given and some elements are not explicitly initialized they are set to zero
int arr[] = {0,1,2};
int arr1[5] = {0,1,2}; // Initialized as {0,1,2,0,0}
const char a_arr1[] = {'c'.'+','+'} //size = 3;
const char a_arr2[] = {"c++"} //size = 4 because of
null character at the
end of the string;
const char a_arr3[6] = "Daniel"; // ERROR; Daniel has 7 elements
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
I want to take 1.1 as input but when I am declaring it as float the output is given as 1.1000000
Suppose that three integer variables intA, intB, and intC have already been defined at the beginning of the main function, write a single C++ statement to read three integers from
New App Production company is seeking an organized and highly accomplished design team to prepare the first (and potentially more) of my companies' App concepts, intended completel
Create a program that will accept 3 numbers. The first number (num1) is the common difference and the second number (num2) is the starting number and the 3rd number (num3) is the m
Define Four Facilities Provided by C Language Preprocessor? The C language preprocessor provides four separate facilities that you can use as you see fit: Inclusion
what do you mean by control word
C program to define power of a function: Write a program to use power of a function. void main() { int x,y,po=1,i,j; clrscr(); printf("Give x,y\n"); sca
#include #include #include void* memorycopy (void *des, const void *src, size_t count) { size_t n = (count + 7) / 8; char* destination = (char *) des; char* source =
3 . Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd