main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answers were Sorted based on User's Feedback
Answer / mortal
num[i] is num[1] and its reassigned as i++ that is 1 thus it
will print 1.
but im not at all sure about this..
Is This Answer Correct ? | 2 Yes | 10 No |
Answer / sathya
num[i]=i+1
num[1]=1+1=2, but num[1] is 1.so there is a error...
Is This Answer Correct ? | 4 Yes | 13 No |
A woman had somany gloves and hats 22 red,34 blue, 45 white...there was power cut and she took a glove and how many gloves shud she take so that she gets a pair of glove fr each color??
Write a function to find the area of a triangle whose length of three sides is given
What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }
What is struct node in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
what is meant by flushll() in c programming?
what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???
What is wrong with this program statement?
how to generate the length of a string without using len funtion?
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.
What are 3 types of structures?
write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.