Given a piece of code
int x[10];
int *ab;
ab=x;
To access the 6th element of the array which of the
following is incorrect?
(A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .
Answers were Sorted based on User's Feedback
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1
Diff between for loop and while loop?
What are the different types of control structures in programming?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Explain how can I prevent another program from modifying part of a file that I am modifying?
52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?
25 Answers Datamatics, Solartis, TCS, ThinkBox, Trine,
Are there constructors in c?
what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
Are the variables argc and argv are local to main?
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?
WHOT IS CHAR?