what is meant for variable not found?

Answers were Sorted based on User's Feedback



what is meant for variable not found?..

Answer / vivek

Its a very simple answer if u r thinking as a software
engineer . so these mimi things are very importants .
variable not found means . in this program
U HAVE NOT DECLARED THE VARIABLE CALLED iSum . AND U R
TRYING TO ASSIGN THE i + j TO iSum VARIABLE WHICH WAS NOT
DECLARED THATS Y THE COMPILER GIVING AN ERROR .

Is This Answer Correct ?    1 Yes 0 No

what is meant for variable not found?..

Answer / yogambika

when u have not declared variable in the main function or
any other function but used in the program.
example:
main()
{
int i,j;----------------> (iSum not declared)
printf("enter the value of i and j");
scanf("%d%d",&i,&j);
iSum = i + j;
printf("The Sum =",iSum);
getch();
}
In this case iSum will Show a compiler error "Variable not
found".

Is This Answer Correct ?    1 Yes 1 No

what is meant for variable not found?..

Answer / deepti khanna

in some of the programming language it is not required to
declare a variable before we use, but in c++ while using a
variable prior to that we need to declare the variable
first.

main()
{
i=25;
cout<<i;
}
above program may show error because we doesn't declare a
variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C C++ Errors Interview Questions

How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?

1 Answers  


I'm having trouble with coming up with the correct code. Thank You!! The assignment was to write a program using string functions that accepts a price of an item and displays its coded value. The base of the keys: X C O M P U T E R S 0 1 2 3 4 5 6 7 8 9 Sample I/O Dialogue: Enter Price: 489.50 Coded Value: PRS.UX

0 Answers  


What are the different types of errors in C and when they occur?

4 Answers  


I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00

3 Answers   UCB,


quoroum of computer languages?

0 Answers   Infosys,






write a profram for selection sort whats the error in it?

2 Answers  


Write a program to accept two strings of Odd lengths. Then take all odd characters from one string and even characters from the other and concatenate and produce a string.

1 Answers  


write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;

0 Answers  


what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }

4 Answers  


What is the code for following o/p * * * * * * * * * * * * * * * *

1 Answers  


void main() { int i=7; printf("N= %*d",i,i); }

6 Answers   HCL,


Given that two int variables, total and amount , have been declared, write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time. After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ). Instructor's notes: If you use a loop, it must be a for loop. And if you use a loop control variable for counting, you must declare it.

1 Answers   Google,


Categories